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.

[ResponsiveRect]

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

[Square]

6 Comments

Add a Comment

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