Become Wordpress Professional - Your Ultimate Wordpress Guide

Monday, 1 April 2013

How to add Facebook Comment Box in WordPress

adding facebook comment box in wordpress
Now a days social networks is a great way to introduce yourself and delivered your ideas and Facebook is the biggest and well organized social network where you can easily promote your blog posts and ideas with people. Facebook introduced comment box system for bloggers to socialize their blog comment system in an organized manner. If people comment on your blog post via Facebook comment box, then their comment also appears in their timeline and this means their friends will see the status and will come over to join the conversation.

Facebook Comment Box social plugin 

You can add up new Facebook comment box instead of default comment box in just a few simple steps.



Enter your website URL where you want to display Facebook comment box. Set the width and color scheme of comment box according to your need and click Get Code.


Copy this XFBML comment box code and paste it where you want to display comment box. Normally it will appears after the post section so you might want to add this code to your theme's single.php file. 

Next step is to copy the code below and paste it above the closing </head> tag. In WordPress it will appear in your header.php file. Replace “{YOUR_FACEBOOK_USER_ID}” with your own Facebook Profile ID to manage and moderate comments.

<meta property="fb:app_id" content="{YOUR_FACEBOOK_USER_ID}">

Now copy the code below and paste it after the opening <body> tag. This is SDK file call that is required to generate the facebook comment box.

<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>


Its done. Facebook Comment box will now working fine in your each blog post.

Adding Facebook comment box via WordPress plugin

WordPress has its own Facebook comment box plugin and the plugin is highly recommended because it is friendly to use and easy to integrate. Let's learn how it works.


Install plugin and activate it. It will create a new panel in Dashboard >> Setting tab >>Facebook comment setting.

Now Login to your Facebook Account and open Facebook Developer tool.

Click on App button from top toolbar and Register yourself. 

Now click Create New App button


Chose Your add name and click Continue.


In next step you will fine App ID and App Secret. Copy both and save it in your computer. Fill the remaining fields and click Save Settings.


Now go back in your WordPress Dashboard and Navigate to Settings >> Facebook comment setting.

The last step is to enter your App ID and App secret in the required fields. 



Click on save settings and you are done. This plugin will replace your default comment box into new organized Facebook Comment box. You visitors will now comment on your posts with their Facebook IDs.

2 comments:

  1. Copy this XFBML comment box code and paste it piratage facebook where you want to display comment box. Normally it will appears after the post section so you might want to add this code to your theme's single.php file.

    ReplyDelete

Please Avoid Spamming. Comments will be moderated before they are published.