【问题标题】:Facebook Comment Plugin not Loading for Github PageFacebook 评论插件未加载到 Github 页面
【发布时间】:2020-09-06 01:53:00
【问题描述】:

我在 GitHub-Pages 中有一个博客,我想在其中加载 Facebook 评论插件:
https://juspreet51.github.io/blog_posts/demo.html

来自 Facebook 评论插件Doscumentaion,我使用了以下参数:-

然后在以下 .html 文件中使用生成的代码:

<!DOCTYPE html>
<html>
<head>
  <title>Demo</title>
</head>
<body>
  <!-- facebook plugin JavaScript SDK -->
  <div id="fb-root"></div>
  <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v8.0" nonce="uOgIM47N"></script>

  <h1>Hello World</h1>
  <h3>Below this line, ideally comment should appear</h3>

  <!-- comments to appear below -->
  <div class="fb-comments" data-href="https://juspreet51.github.io/blog_posts/demo.html" data-numposts="10" data-width=""></div>

</body>
</html>

仍然没有加载评论插件,请您指出可能出了什么问题?

*当我从手机浏览器访问the link时,评论部分可见
所以我尝试清除我的 PC 浏览器历史记录和缓存,但评论部分在 PC 浏览器中仍然不可见,但仅在移动浏览器中可见

【问题讨论】:

    标签: javascript html github-pages facebook-comments facebooktoolkit


    【解决方案1】:

    也许您需要请求许可才能这样做。

    生成代码时在页面上发表 Facebook 评论:

    所以请确保您点击通知上的链接并获取您的公开访问权限

    【讨论】:

    【解决方案2】:

    在您遇到问题的浏览器中检查网站的控制台,并检查您的浏览器是否阻止了 cookie

    错误可能如下所示:

                A cookie associated with the cross-site resource at https://facebook.com/ was set without the `samesite` attribute. It has been blocked
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-11-13
      • 1970-01-01
      • 2020-05-12
      • 2012-02-10
      • 2011-06-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多