2009-11-27 39 views

回答

22

你想要的是<meta>標籤,Facebook在其文檔中定義的Facebook_Share/Specifying_Meta_Tags

你不把圖像本身周圍的元數據,而是你把它放在文件的頭部,就像這樣:

<meta name="title" content="The Title Of The Link" /> 
<meta name="description" content="A description of the link would go here." /> 
<link rel="image_src" href="http://www.example.com/images/image.jpg" /> 
+0

感謝您的好解答。 – user94154 2009-12-01 05:33:10

+0

如果我想動態(從數據庫)共享鏈接,我怎樣才能指定每一個頭。 – Jenz 2013-10-23 04:34:40

1

接受的答案現在已過時。新的方式是使用open graph tag

<meta property="og:image" content="http://example.com/picture.jpg" /> 
+0

我今天使用這個元屬性,工作正常。包括預覽詳細信息的一些更多詳細信息可用:http://stackoverflow.com/a/18817334/281087 – 2015-06-17 09:04:56

相關問題