【问题标题】:Facebook Like button showing RIGHT Title but WRONG Description and WRONG thumbnail (Wordpress)Facebook Like 按钮显示正确的标题但错误的描述和错误的缩略图 (Wordpress)
【发布时间】:2018-03-16 22:41:02
【问题描述】:

好的,所以当我喜欢我的 wordpress 博客上的帖子时,它会以正确的标题显示在 Facebook 上,并且喜欢该帖子,但缩略图和描述是错误的。

我喜欢使用以下代码:

<div id="fb-root"></div>
                  <script>(function(d, s, id) {
                    var js, fjs = d.getElementsByTagName(s)[0];
                    if (d.getElementById(id)) return;
                    js = d.createElement(s); js.id = id;
                    js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=266693680020880";
                    fjs.parentNode.insertBefore(js, fjs);
                  }(document, 'script', 'facebook-jssdk'));</script>
                <div class="fb-like" data-href="<?php the_permalink();?>" data-send="true" data-layout="button_count" data-width="100" data-show-faces="false"></div>

但正如我所说,所有赞的描述都是相同的(仅我的 wordpress 博客的 URL),缩略图是另一篇帖子中的随机缩略图。

【问题讨论】:

    标签: wordpress facebook facebook-like


    【解决方案1】:

    你的 og: 元标记对被喜欢的页面说了什么?

    尝试在https://developers.facebook.com/tools/lint 对其进行 linting,以确保 Facebook 正确读取您的 og: 标签。

    【讨论】:

    • 什么是 og 标签,我在 wordpress 中哪里指定它们?
    • OG 标签位于 DOM 的 &lt;head&gt; 部分。查看 wordpress 的帮助,了解如何将自定义内容插入 &lt;head&gt; 部分。有关开放图形标签的更多信息,请参阅ogp.me
    猜你喜欢
    • 2014-09-08
    • 1970-01-01
    • 1970-01-01
    • 2016-03-19
    • 1970-01-01
    • 1970-01-01
    • 2011-02-26
    • 1970-01-01
    • 2014-06-23
    相关资源
    最近更新 更多