javascripthtmlgithub-pagesfacebook-commentsfacebooktoolkit

Facebook Comment Plugin not Loading for Github Page


I have a blog in GitHub-Pages, where I want to load Facebook Comment Plugin:
https://juspreet51.github.io/blog_posts/demo.html

From the Facebook Comment Plugin Doscumentaion, I used following parameters:-

And then used generated code in following .html file:

<!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>

Still, the comment plugin is not loading, can you please point what might have gone wrong?

*Comment section is visible when I visit the link from mobile phone browser
So I tried clearing my PC browser history and cache, still comment section is not visible in the PC browser, but visible just mobile browser


Solution

  • Maybe you need to request permission to do that.

    Facebook comment on the page when u generate the code :

    enter image description here

    So make sure u click on that link on the notification and grab your permission for a public access