Sunday 12 May 2013
Facebook StumbleUpon Twitter Google+ Pin It

Facebook Comments Plugin for Wordpress and Blogger

Facebook is a popular social media portal to share updates and useful links for friends. This post explains how to integrate Facebook comments plugin script into Blogger and Wordpress blogs. Just few lines of code, I feel it's very useful for generating blog traffic.

Developer Facebook providing awesome social plugins for sharing things to friends. First you have to create a Facebook application then you can generate the FB script code click here
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId=YOUR_APP_ID
&amp;xfbml=1"></script>
<fb:comments xid="POST_ID" numposts="10" width="425" publish_feed="true"></fb:comments>

Blogger
Find this line of code at blogger Design - Edit HTML enable Expand Widget Templates check box
<b:includable id='comments' var='post'>

Copy and paste the following code below the line above.
<b:includable id='comments' var='post'>
<h4>Facebook Comments</h4>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId=YOUR_APP_ID
&amp;xfbml=1"></script>
<fb:comments expr:xid="data:post.id" numposts="10" width="425" publish_feed="true"></fb:comments>

Wordpress
Find this line of code at Wordpress theme 'single.php' here the path wp-content -> themes -> Your_Theme -> single.php
<?php comments_template(); ?>
Copy and paste the following code above the line above:
<h4>Facebook Comments</h4>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId=YOUR_APP_ID
&amp;xfbml=1"></script>
<fb:comments xid=">?php the_ID(); ?>" numposts="10" width="425" publish_feed="true"></fb:comments>
<?php comments_template(); ?>


-By Parthiv Patel
Parthiv Patel
Bhaishri Info Solution
Sr. PHP Developer
Limdi Chowk, AT PO. Nar, Di. Anand
Nar, Gujarat
388150
India
pparthiv2412@gmail.com
7383343029
DOB: 12/24/1986

No comments: