Facebook
Facebook comment box
Like count box
This will add a custom box from facebook with only the number of likes and not the like button itself.
<span class="fb-comments-count" data-href="http://example.com/"></span> comments
Comment box
1. Add script just beneath <body> tag (make sure to change the <APP_ID> part:
<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_US/sdk.js#xfbml=1&version=v2.5&appId=1<APP_ID>";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
2. Add this code snippet to where you want the comment box to appear:
Place the code for your plugin wherever you want the plugin to appear on your page.
<div class="fb-comments" data-href="http://developers.facebook.com/docs/plugins/comments/" data-numposts="5"></div>
3. (optional):
If you want the comment box to align center, place it inside a dive with style "text-align:center", like:
<div style="text-align:center">
<div class="fb-comments" data-href="http://developers.facebook.com/docs/plugins/comments/" data-numposts="5"></div>
</div>
Published: 2016-08-25