Pages

Monday, July 14, 2014

How to Add Facebook Comments Box In Blogger

As Facebook is one of the biggest social networking site on internet now and there are millions of users who are using Facebook to stay connected with their friends and family members, Recently one of my readers asked me how to add Facebook comment box in my blogger blog then this post is going to show very simple tutorial so that you can easily add Facebook comments to your blogger blog which will definitely yield in more comments since most of the users are usually logged in on their Facebook accounts both on their mobile phones or on their system so you can capitalize on this specially if your blog is not getting much comments

Read - How to get more blog comments


Also if someone comments on your blog then their comments will be posted on their wall so their friends can also see and chances are pretty much they will visit your blog or like that particular comments so it can go viral and you can receive good amount of traffic by using facebook comments on your blog So without wasting much time lets see how we can add facebook comments to our blogger blog

Read- How To Add Facebook Like Box To Blogger

Adding Facebook Comments Box In Blogger


Add Facebook Comments Box Blogger
How to Add Facebook Comments Box In Blogger

To install facebook comments on blogger you have to first create facebook application by which you will get App Id which is required later in the process So lets first create the application and get app id

1) Log in to your Facebook account 

2) Go to Facebook developers page and if you are not registered then register it and then you will be taken to facebook developers page so click on apps dropdown menu as shown in below image and select Create A New App 

Adding Facebook Comments Blogger


3) Give name to your app and select the category and click create app as show below

Add Facebook Comments Blogger

4) Now on next page you will get your App Id which you need later so copy it somewhere or in notepad



So now half part is done and now we will see how to add it to our blogger blog

Installing Facebook Comments In Blogger


1) Log in to Blogger dashboard and click on Templates then Edit Html

Note- Before making any changes to your blogger template make sure to backup your complete template to be on safer side



2) Now press CTRL+F and search for <html and replace it with below code
<html xmlns:fb='http://www.facebook.com/2008/fbml'



3) Now search for </body> and paste below code just before it.

<div id='fb-root'/>
<script>
window.fbAsyncInit = function() {    FB.init({      appId  : &#39;YOURAPPID&#39;,    
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session    
xfbml  : true  // parse XFBML    });  };  
(function() {    var e = document.createElement(&#39;script&#39;);    
e.src = document.location.protocol +   &#39;//connect.facebook.net/en_US/all.js&#39;;  
e.async = true;    
document.getElementById(&#39;fb-root&#39;).appendChild(e);    }());
</script>


Replace YOURAPPID with previous copied app id

4) Now Search </head> and paste below code just above it

<meta expr:content='data:blog.pageTitle' property='og:title'/>
<meta expr:content='data:blog.url' property='og:url'/>
<meta content='Nice Blogging Tips' property='og:site_name'/>
<meta content='YOURAPPID' property='fb:app_id'/>
<meta content='http://www.facebook.com/nicebloggingtips' property='fb:admins'/>
<meta content='article' property='og:type'/>

Replace YOURAPPID with previous copied app id

nicebloggingtips with your facebook page name

Nice Blogging Tips with your Blog Name

Facebook Comment Box


1)  Search For <b:includable id='comment-form' var='post'> or search for <div class='post-footer'> and paste the below code just above it


<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div style='padding:0px 0px 0px 0px; margin:0px 0px 0px 0px;'><script
src='http://connect.facebook.net/en_US/all.js#xfbml=1'/>
<div>
<fb:comments colorscheme='light' expr:href='data:post.url'
expr:title='data:post.title' expr:xid='data:post.id'
width='530'/></div>
<div style='color:#fff;
background-color:#3B5998;border: solid 1px #ddd; font-size:10px;
padding:3px; width:520px;'>Facebook Blogger Plugin by <b><a
alt='blogger templates' href='http://www.safetricks.com'
style='text-decoration:underline; color:#fff;' target='_blank'
title='blogger templates'>Safe
Tricks</a></b></div></div>
</b:if> 


2) Now you can change the width value according to your need and just click save and you are done now go and check your blog to see facebook comments on your blogger blog


Optional: Hide Default Blogger comments


1) Go to settings and then Post and Comments

2) Change Comment location To Hide and click on Save that's it

Now you will only have facebook comment box on your blog and default blogger comment box will be hidden




So friends this is how to add facebook comments box in blogger blog if you like this post please share also if you have any questions do ask in comments section and don't forget to subscribe below to get more blogger tips and tricks and keep coming back for more blogging tips
Read more ...