【问题标题】:Facebook meta image not working on sharingFacebook 元图像无法共享
【发布时间】:2017-08-13 22:53:21
【问题描述】:

分享按钮上的自定义 Facebook 图像不会出现。我正在从本地主机尝试,这可能是一个原因吗?(还不能在生产中测试)。图片地址来自网络,试过不同的

<meta property="og:type"          content="here is production website address" />
  <meta property="og:title"         content="Your Website Title" />
  <meta property="og:description"   content="Your description" />
  <meta property="og:image"         content="https://crunchbase-production-res.cloudinary.com/image/upload/c_limit,h_600,w_600/v1422480063/h0fvargheeyaybm4oyyt.jpg" />
  <meta property="og:image:type" content="image/jpg" /> 
<meta property="og:image:width" content="400" /> 
<meta property="og:image:height" content="300" />

按钮。链接指向真实的网站页面,但元标记是 Facebook 方面唯一重要的表示(据我所知)

<div class="fb-share-button"  style="width: 250px;
  height: 56px;
  background-color: #3a5998; text-align: center;line-height: 54px;color:white;" data-href="http://www.tick-tock.com.ua/event/144/" data-layout="button" data-size="large" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://www.tick-tock.com.ua/event/135/" style="color: white;">Share on Facebook</a></div>

还有什么可以让它不起作用?没有找到任何直接的答案,没有太多类似的重复答案。

【问题讨论】:

    标签: html image facebook http meta


    【解决方案1】:

    这不适用于您的本地主机。 Facebook 实际上会抓取一个页面来读取 og 元信息。它无法抓取您的本地主机。

    但是,一旦您将其上线,您就可以让 Facebook OG 调试器立即抓取页面并读取元数据。

    https://developers.facebook.com/tools/debug/

    【讨论】:

      【解决方案2】:

      Facebook 分享器不再支持图片、名称、标题、缩略图、描述等自定义字段。

      有关更多信息,请查看:https://developers.facebook.com/docs/apps/changelog 并查找“v2.9 中的弃用”

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-01-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多