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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With