【问题标题】:Google Plus One Button Code is visible on Facebook ThumbnailGoogle Plus One Button Code 在 Facebook 缩略图上可见
【发布时间】:2011-12-23 14:21:18
【问题描述】:

我将以下标准 Google Plus One 代码添加到我的网站。

<!-- Place this tag where you want the +1 button to render -->
<g:plusone annotation="inline"></g:plusone>

<!-- Place this render call where appropriate -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

我将代码添加到我的 phtml 代码的底部。它按预期工作。但是,当我在 Facebook 中提供我的页面链接时,它会在缩略图中显示以下代码!我尝试从我的站点中删除整个 Google Plus One 代码,但是当我尝试在 FB 中提供指向我的站点的链接时,此代码(顺便说一下,只有此代码)再次出现在缩略图中。那么有什么办法可以防止这段代码出现在 Facebook 缩略图上呢?

【问题讨论】:

    标签: php facebook thumbnails google-plus google-plus-one


    【解决方案1】:

    您是否尝试将 Open Graph 标记添加到您的页面?喜欢标题、描述、图片等? Here's the documentation,还有一个很棒的tool that helps you see how Facebook scrapes your pages

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-05
      • 1970-01-01
      • 2012-08-20
      • 1970-01-01
      相关资源
      最近更新 更多