如何在fb评论帖中更改缩略图?

时间:2012-06-06 12:26:26

标签: php facebook image facebook-graph-api

当我通过我创建的网页发表评论时,Facebook会尝试从该特定页面检索一些图像,并根据需要选择缩略图。如何选择此缩略图的图像?

2 个答案:

答案 0 :(得分:2)

你应该use facebook open graph meta tags

<meta property="og:image" content="http://davidwalsh.name/wp-content/themes/klass/img/facebooklogo.png"/>

不要忘记你需要让你的html标签看起来像这样:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://developers.facebook.com/schema/">

这里也是(davidwalsh.name)关于这个主题的好文章

正如this answer所述:数据可以由facebbok缓存,您可以通过特殊的facebook调试工具在此处查看:http://developers.facebook.com/tools/debug

答案 1 :(得分:0)

向页面添加og:image元标记。有关详细信息,请参阅https://developers.facebook.com/docs/opengraph/reference/