【发布时间】:2012-08-03 02:00:57
【问题描述】:
当我通过我创建的网页发表评论时,Facebook 会尝试从该特定页面检索一些图像,并根据需要选择帖子的缩略图。如何选择此缩略图的图像?
【问题讨论】:
标签: php facebook image facebook-graph-api
当我通过我创建的网页发表评论时,Facebook 会尝试从该特定页面检索一些图像,并根据需要选择帖子的缩略图。如何选择此缩略图的图像?
【问题讨论】:
标签: php facebook image facebook-graph-api
你应该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
【讨论】:
向页面添加 og:image 元标记。更多信息请见https://developers.facebook.com/docs/opengraph/reference/
【讨论】: