Skip to main content
Facebook Comment Box

How to Add Facebook Comment Box to HTML Website

How to Add Facebook Comment Box to Website Pages to Engage Visitors in Commenting

 

Commenting on Facebook post or videos are always been an imperative strategy to generate visitors. By commenting on each and very post we engaged our visitors towards the contents reliability. The process of commenting enable us to get the idea about how people reacting to our post and content. More and more comment gives more visibility to other user Facebook users. It help to generate more engaging visitors to participate in post comment and share. The Plugin Facebook Comment Box permit us to add comment box on our each and every website content, so that people can directly comment on our post without getting into Facebook page.

Let Should We learn How to Add Facebook Comment Box

 

1. Load your Javascript SDK in your web page

To working with adding comment Box on web Content we need to Copy and Paste given JavaScript Code in your Web pages within <Body> tag. This is the javascript function to display Facebook Comment Box within web pages. The javascript code will trigger the comment plugin to work.

<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.4";
  fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));</script>

 

 

2. Add Plugin Code Adding Comment Box

Add your plugin code in place where you want to display your Facebook Comment Box. Replace the line “Your-like/share-URL” with your post URL to get comment. You can increase the width of the comment box by changin the value for data-width attribute or change the number of post comment visible by changing data-numposts value.

<div class="fb-comments"  data-href="[Your-Like/share-URL]" data-width="740" data-numposts="5"></div>

 

3. Upload Your Web Page and Test the Given Code

Please check the result page after adding your Facebook Comment Box to your Website contents.

I have uploaded result page. Check Here.

Read: Embed Facebook Video on Websites Pages

Read: Add Facebook Like and Share Button Code For Website

6 thoughts on “How to Add Facebook Comment Box to HTML Website

  1. Oh my goodness! Impressive article dude! Many
    thanks, However I am going through troubles with your RSS.

    I don’t understand why I can’t join it. Is there anybody having the
    same RSS issues? Anyone who knows the answer will you kindly respond?
    Thanks!!

  2. itx lil complicated plz help me for em making a comment box but i cant store that comment with time nd id like fb nd other apps what would i do now

Leave a Reply

Your email address will not be published. Required fields are marked *