【问题标题】:How do i change thumbnail image in a fb comment post?如何更改 fb 评论帖子中的缩略图?
【发布时间】:2012-08-03 02:00:57
【问题描述】:

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

【问题讨论】:

    标签: php facebook image facebook-graph-api


    【解决方案1】:

    你应该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 影响了帖子。但是:当我输入: 对象调试器接受并找到图像,但是当我这样说时: 其中 $itemImage 是 Item24.jpg ,对象调试器无法识别它并选择另一个。为什么 ?连接有什么问题吗??
    【解决方案2】:

    向页面添加 og:image 元标记。更多信息请见https://developers.facebook.com/docs/opengraph/reference/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-07
      • 2020-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多