Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook comments getting error Cannot read property 'handleServerJS' of undefined

I try to include the Facebook comments in a page but I'm always getting the following error.

Uncaught TypeError: Cannot read property 'handleServerJS' of undefined

Here my codes.

Right after the opening <body/> tag I include this.

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

And somewhere on the page I include the comment box.

<div class="fb-comments" data-href="<?php echo get_permalink() ?>" data-numposts="5" data-colorscheme="light"></div>

Edit: I don't know what is causing this but it seems to work.

like image 808
Thomas Venturini Avatar asked May 07 '14 09:05

Thomas Venturini


Video Answer


1 Answers

I've also run into this error. Looked everywhere and found nothing apart from here. Following Tamerlane's suggestion, logging out of your Facebook account (Which I assume is the Admin) clears up the issue.

Comments seem to post fine, despite this error, as I tested it as Admin also.

I know this doesn't fix the issue, but the error doesn't seem to stop the functionality, its just annoying to have.

like image 98
happymonkeyshoes Avatar answered Sep 18 '22 09:09

happymonkeyshoes