How to Add Facebook Like Button to Blogger
After Facebook deprecated the share button, the Like button became one of the famous and widely used social sharing button as it let your blog readers to share your posts and articles with their Facebook friends with just one click.
When you will visit the official page you will find that there are two different versions of Like button for which the implementation processes are also different. The most flexible one is XFBML but it requires a series of steps before it can be added to any webpage while Iframe version of the Like button is more easy to add. So here we will find out how it can be added to Blogger blogs.
Facebook Like button for Blogger
Step 1: Log in to Blogger and from the dashboard go to blog’s Template tab. Next click “Edit HTML” and check “Expand Widget Templates”.
Step 2: Find
<data:post.body/> and immediately after or before it (or both if you want to have the Facebook Like button on top and also at the bottom of the Blogger posts) add the below code after selecting the options you like to have.
Preview and code
<b:if cond='data:blog.pageType != "static_page"'><div style="float: none;"> <iframe allowTransparency='true' expr:src='"http://www.facebook.com/plugins/like.php?href=" + data:post.canonicalUrl + "&send=false&layout=
35"' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:
Step 3: Save your template.
layout– There are three sizes avilable, options are ‘standard’, ‘button_count’ and ‘box_count’.
action– The text to display, that is, ‘like’ or ‘recommend’.
colorscheme– The colour of the button.
font– Font you like to use.
width– I have enabled this option for users who want to change the width of the Like button. If you don’t know the default widths as per Facebook standards then don’t change anything here.
show_faces– Option to show profile pictures of your Facebook friends (only) who have liked your post. I have set it to ‘false’. If you want then you can change it to ‘true’ but you also have to change the
send– This option is not available in Iframe version.
XFBML Like button
P.S. This post has been updated on 2013-4-16.