【问题标题】:Facebook "send" button does not display on pageFacebook“发送”按钮不显示在页面上
【发布时间】:2018-09-15 06:28:08
【问题描述】:

我已将 Facebook 发送按钮添加到我的网站,但它没有显示。 Facebook 是否关闭了发送功能?

Here is the page in question.

The documentation for the Facebook Share widget is here.

下面是html页面的代码

<html>
<head>
  <title>Your Website Title</title>
    <!-- You can use open graph tags to customize link previews.
    Learn more: https://developers.facebook.com/docs/sharing/webmasters -->
  <meta property="og:url"           content="https://www.your-domain.com/your-page.html" />
  <meta property="og:type"          content="website" />
  <meta property="og:title"         content="Your Website Title" />
  <meta property="og:description"   content="Your description" />
  <meta property="og:image"         content="https://www.your-domain.com/path/image.jpg" />
</head>
<body>

  <!-- Load Facebook SDK for JavaScript -->
  <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 = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
    js.src = 'https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.12&appId=299539706821986&autoLogAppEvents=1';
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));</script>

  <!-- Your send button code -->
  <div class="fb-send" 
    data-href="https://compesh.com/test2.html" 
    data-layout="button_count">
  </div>
  <div class="fb-send" data-href="https://compesh.com"></div>

</body>
</html>

【问题讨论】:

  • 它甚至在文档中的生成器中都不起作用,所以我猜这要么当前已损坏,要么他们已将其删除。

标签: facebook widget send


【解决方案1】:

根据https://developers.facebook.com/docs/plugins/send-button

随着 Graph API 版本 2.11 的发布,发送按钮是 已弃用。对于 Graph API 版本 2.10 及更低版本,发送按钮 将支持到 2018 年 2 月 5 日。

【讨论】:

    猜你喜欢
    • 2012-01-28
    • 1970-01-01
    • 1970-01-01
    • 2018-07-11
    • 1970-01-01
    • 2013-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多