2

I'm using facebook comment plugin with my php dynamic website. The comment box is working fine but the facebook count is not working it always shows zero comments.

I use this in index.php

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

I use this on the page with the comment box

<fb:comments-count href="http://mywebsite.nl/news/<?=$news['ID'];?>.html"></fb:comments-count>

Any solutions?

1

1 Answer 1

1

Does the url in the href above match the url given in the <meta property="og:url" ... /> tag for the page? The one in the og:url tag is the one Facebook will associate the comments with.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.