【问题标题】:Facebook, Pinterest ignoring og:image, but debugger says everything's fineFacebook,Pinterest 忽略 og:image,但调试器说一切都很好
【发布时间】:2013-11-27 18:08:39
【问题描述】:

当我将https://testing.grabble.co.uk/user/index/user/ben.mu 粘贴到 Facebook 时,出于某种原因,它会从页面顶部选择横幅图像,而不是 og:image 元标记中指示的图像。

但是,https://developers.facebook.com/tools/debug/og/object?q=https%3A%2F%2Ftesting.grabble.co.uk%2Fuser%2Findex%2Fuser%2Fben.mu 表示所有内容都已正确完成。有人知道为什么会这样吗?图片为 200x200,据我了解,它应该足够大,让 Facebook 不会忽略它。

此外,Pinterest 似乎也忽略了我们所有的 og:image 标签,即使设置的图像为 450x450 或更大。我怀疑这是相关的。

【问题讨论】:

    标签: facebook facebook-opengraph pinterest


    【解决方案1】:

    如果 og:image URL 没有作为实际的<img/> 元素出现在页面中,Facebook 显然会在您在 og:image 属性中指定的图像上拍摄更大、更详细的图像。解决此问题的方法是将横幅图像从 <img/> 标记切换为 background-image:url() CSS 属性。现在一切正常,包括在 Pinterest 上。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-06-14
      • 2021-08-31
      • 2013-02-14
      • 2012-04-24
      • 1970-01-01
      • 2011-12-01
      • 1970-01-01
      相关资源
      最近更新 更多