Html 如何指定要出现在您网站的 facebook 链接中的图像?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2090179/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to specify an image to appear in facebook link to your site?
提问by Jason Kester
Silly question: Seeing as how Facebook will automatically sniff out images from a website when somebody links to it, is there any way to give Facebook a hint as to which image you'd prefer be used from your site? Currently, the logo image that I'd like to appear doesn't even show up in the list that Facebook generates.
愚蠢的问题:鉴于当有人链接到某个网站时 Facebook 如何自动从网站上嗅探图像,是否有任何方法可以让 Facebook 提示您希望从您的网站使用哪个图像?目前,我想显示的徽标图像甚至没有出现在 Facebook 生成的列表中。
Any ideas?
有任何想法吗?
采纳答案by eliah
<link rel="image_src" href="/path/to/image.jpg" / >
回答by rickmaneluis
There is also a new format
还有一种新格式
<head>
<meta property='og:image' content='http://yoursite.com/INSERT_YOUR_IMAGE.jpg'/>
</head>
More details hereand here. Also the facebook share docsas posted by eliah on this page.
更多细节在这里和这里。还有facebook 共享文档,由 Eliah 在此页面上发布。