Priyanka Agarwal
Priyanka Agarwal

Reputation: 73

Facebook Comment Plugin not working

I have configured Facebook comment in website.

<script>

  window.fbAsyncInit = function() {
    FB.init({appId: '****************', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>


    <div id="fb-root"></div>


<div class="fb-comment"><fb:comments href="http://XX.YY.ZZ/website" num_posts="8" width="610"></fb:comments>/div>

Whenever someone login and comment, they got error

Sorry, this feature isn't available right now.

Please let me know if it is because I have used IP address rather domain name, or there are settings in Facebook app for comment or anything else.

Upvotes: 0

Views: 1527

Answers (1)

user4577628
user4577628

Reputation:

include js-sdk

<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/sdk.js#xfbml=1&version=v2.4";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>



<div class="fb-comments" data-href="http://developers.facebook.com/docs/plugins/comments/" data-numposts="5"></div>

Upvotes: 2

Related Questions