Loading

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.

Related Articles



2 Talks:

Creative Commons License This work is licensed under Creative Commons Attribution-Share Alike 3.0 License. If you choose to use this or any part of this post on your site please link back to this page.
Related Posts with Thumbnails

Find great articles from selected resources

Popular Posts this Week