網站分享已經氾濫的出現在我們的臉書上,太常使用讓我來筆記一下。

 

基本的網站都有html meta,如下:

<head>
<meta name="description" content="Free Web tutorials" />
<meta name="keywords" content="HTML,CSS,XML,JavaScript" />
<meta name="author" content="Hege Refsnes" />
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
</head>

但是只有這些不夠用
現在很多網站都會使用FB分享
下面的Open Graph可以讓我們指定出現在FB上的title / content / small image

<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description" content="A group of U.S. Marines, under command of a renegade general."/>


[注意!]
由於FB有暫存機制二十四小時,要如何把剛改好的og資料立刻更新呢?
Debugger,填入要分享的網址,送出更新資訊就可以瞜:)

 

 

 

arrow
arrow

    cabuchi 發表在 痞客邦 留言(0) 人氣()