【问题标题】:Facebook does not recognize OG tags of websiteFacebook 无法识别网站的 OG 标签
【发布时间】:2014-07-15 03:00:48
【问题描述】:

我为 og:title、og:image 等添加了元数据。 但由于某种原因,facebook 没有看到它们。 我得到错误: 'website' 类型的 URL 'http://www.heliconbooks.com/article/authorlanding' 处的对象无效,因为未提供'string' 类型的必需属性'og:title'。

我查看了 facebook 抓取工具,出于某种原因,这些元标记被省略了。当我查看源代码时,我会看到它们。

我做错了什么?

【问题讨论】:

    标签: facebook facebook-graph-api


    【解决方案1】:

    查看https://developers.facebook.com/tools/debug/og/echo?q=http%3A%2F%2Fwww.heliconbooks.com%2Farticle%2Fauthorlanding

    在那里你可以看到FB没有看到任何OG标签。如果我查看您链接的网站的来源,也没有 OG 标签。所以,根据https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content#tags修复你的代码

    【讨论】:

    • 我知道这个链接并且我检查了它。当我单击查看源时,我确实看到了它。尝试以下链接:heliconbooks.com/?id=authorlanding&lang=he Facebook 声称同样的错误,而我确实看到了 facebook og:title
    • 是的,而且?你的源代码中甚至都没有 OG 标签,那它应该如何工作呢?你读过 FB 文档吗?
    • 如果链接已更改,您应该编辑您的问题!在这个新的 URL 中,只有 og:urlog:image 的标签,这还不够!我的意思是来自调试器的错误消息说明了一切:Object at URL 'http://www.heliconbooks.com/article/authorlanding' of type 'website' is invalid because a required property 'og:title' of type 'string' was not provided.
    【解决方案2】:

    我想我找到了原因,因为我的系统有基于访问者 IP 的自适应模板,所以 facebook 看到了不同的页面模板。 现在它显示了一个图像,但不是我想要的图像。我想我必须继续研究它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多