Your reader will get more choices to comment on your blog. They can use their Facebook account or their blogger account.
Without much further a do. Let us begin the tutorial.
Creating Facebook App
The first thing that we need to do is to create a Facebook App.
Facebook Developer: Click Here
Just follow the steps to setup a Facebook App just make sure will you came up with a Facebook API.
Installation Process in Blogger
A. Set the the blogger comment to embedded.
Instruction: Blogger > Settings > Comments > choose embedded
B. Editing Template
- Go To Blogger > Design > Edit HTML
- Backup your template
- Click the "Expand widget templates" box
- Search for <head>
- Just below it add the following code,
<meta expr:content='data:blog.pageTitle' property='og:title'/>Replace FACEBOOK APP ID with your own Facebook APP ID, the one that you made on top.
<meta expr:content='data:blog.url' property='og:url'/>
<meta content='article' property='og:type'/>
<meta content='FACEBOOK APP ID' property='fb:app_id'/>
<script src='http://connect.facebook.net/en_US/all.js#xfbml=1'/>
<script src='http://code.jquery.com/jquery-latest.js'/>
<script type='text/javascript'>
function commentToggle(selectTab) {
$(".comments-tab").addClass("inactive-select-tab");
$(selectTab).removeClass("inactive-select-tab");
$(".comments-page").hide();
$(selectTab + "-page").show();
}
</script>
6. Search for <html and replace it with the following code.
<html xmlns:fb='http://www.facebook.com/2008/fbml' It should look like this:
C. Adding CSS
Search this code ]]></b:skin> and just above it paste the following CSS:
/*--- Tabbed Facebook Comments ----*/
.comments-page { background-color: #f2f2f2; width:450px;}
#blogger-comments-page { padding: 0px 5px; display: none;}
.comments-tab { float: left; padding: 5px; margin-right: 3px; cursor: pointer; background-color: #f2f2f2;}
.comments-tab-icon { height: 14px; width: auto; margin-right: 3px;}
.comments-tab:hover { background-color: #eeeeee;}
.inactive-select-tab { background-color: #d1d1d1;}
D. Search the this code <div class='comments' id='comments'>, Just below it paste the following code:
<table><tbody><tr>
<td><div
class='comments-tab' id='fb-comments'
onclick='javascript:commentToggle("#fb-comments");'
style='float:left;' title='Comments made with Facebook'> <img
class='comments-tab-icon'
src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiWFy1-rNsqmhlRC6QmoVjVUhmqCcUtGTXmdwDnuCM0w-sHhu0DxXDWMul0rVD7MK9_qWX4Q9fmSx2wWtao7idgF0tjLS0yzZjqPoh2C8osMSJA7F1vxadtbYvUMaiMnvmiTGgrYRUWUM/s400/fbcomment.png'/>
<fb:comments-count expr:href='data:post.url'/> Comments
</div></td>
<td><div class='comments-tab
inactive-select-tab' id='blogger-comments'
onclick='javascript:commentToggle('#blogger-comments');'
title='Comments from Blogger'><img class='comments-tab-icon'
src='http://www.blogger.com/img/icon_logo32.gif'/><data:post.numComments/>
Blogger Comments</div></td>
</tr></tbody></table>
<div class='comments-page' id='fb-comments-page'>
<b:if cond='data:blog.pageType == "item"'>
<div
id='fb-root'/><div
id='fb-root'/><script>(function(d){var js, id =
'facebook-jssdk'; if (d.getElementById(id)) {return;}js =
d.createElement('script'); js.id = id; js.async =
true;js.src =
"//connect.facebook.net/en_US/all.js#xfbml=1";d.getElementsByTagName('head')[0].appendChild(js);}(document));</script>
<fb:comments
colorscheme='light' expr:href='data:post.url'
expr:title='data:post.title' expr:xid='data:post.id'
width='450'/></b:if></div>
<div class='comments comments-page' id='blogger-comments-page' style='display:none; '>
E. Search this code
</b:includable>
Just above it paste this code:
</div>
That's it save your template and your good to go.
Post a Comment