Step1: Visit Facebook developer page and enter your blog name, URL and click on Create application.
Step2:After filling all the details you will get an APPID.Save it in notepad.
Step3:In blogger navigate to design-->Edit html and check expand widgets.
Step4:Now find the line <data:post.body/> and paste the below code after that.
<b:if cond='data:blog.pageType == "item"'>
<div id='fb-root'/>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'APPID', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<fb:comments/>
</b:if>
Step5:Replace APPID in the above code with your APPID.
note:You can easily find code snippets from a webpage by pressing ctrl+f in your browser.Live demo of the above code is right next to you the commentbox of this page.:)
No comments:
Post a Comment