Skip to main content

Adding Facebook 'Like' button to Blogger (It's working!)

 Finally managed to make the newly launched Facebook 'Like' button work with Blogger.
The thing wasn't plain easy so thought of sharing the procedure that worked or me. Following code is an
upgrade on the great hack provided by devfuel .

Steps.

In the Dashboard, goto Edit HTML

First and the most important step: Backup your template by clicking Download Full Template.

Now,Click the Expand Widget Templates

Like me if you want to have 'Like' button for individual posts

Use your Browser's search feature (Ctrl+F) to find the following line of code(or similar code line):

<b:if cond="data:post.url"></b:if>

and just after it put the following code (the actual facebook iframe code with the hack)

<iframe allowTransparency='true' expr:src='"http://www.facebook.com/plugins/like.php?href=" + data:post.url + "&amp;layout=standard&amp;show-faces=true&amp;width=450&amp;height=25&amp;action=like&amp;colorscheme=light"' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:450px; height:25px'/>

Save. And done. That should do the trick. Hope that helps.

Comments

  1. I love posting comments, you know I do, but this *like* button's my very special favourite. Warning: expect a slough of *likes* all over your blog!

    ReplyDelete
  2. Place it on your blog so I can return back the 'likes'.

    ReplyDelete

Post a Comment

I always like to hear back :)
However, irrelevant comments and irrelevant links will not be published. Needless to say, same goes for abusive comment and spam. Leaving back links related to the topic is encouraged. I know it can be tempting but try not to leave your email ids, phone nos and CVs in the comment.