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.

Facebook Like button for BloggerWhen 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.

Button Options





: px


Show for:

Preview and code

Ajax Loading
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<div style="float: none;"> <iframe allowTransparency='true' expr:src='&quot;; + data:post.canonicalUrl + &quot;&amp;send=false&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=35&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:450px; height:35px;'/> </div>

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 height accordingly.
  • send – This option is not available in Iframe version.

XFBML Like button

It is an example of XFBML (or HTML5) Like button which has the send button and also has a special feature, i.e. it will open a comment box whenever a user clicks it to Like an article.


P.S. This post has been updated on 2013-4-16.

Popular posts from this blog

How to Add Extra Gadget/Widget Section to Blogger Header

How to add Google +1 Button to Blogger

Add Facebook XFBML Like Button to Blogger