How to create facebook like button



This tutorial will show you how to add a Facebook Like button to each blog post in Blogger. Clicking this button will like the containing post. It should work on all pages -home page, individual/post page or any other pages.
The Like button lets your reader share your content with his/her friends on Facebook. When clicked, a story appears in his/her friends' News Feed with a link back to your blog.

1. Go to Blogger Dashboard > Your Blog > Template > Edit HTML
2. Backup your template.
3. Check the box of expand widget template.
4. Search for <data:post.body/>.
5. Now if you want to add the plugin at the end of posts, then add the following code below <data:post.body/>. If you want to add the plugin just below post titles, then add the below code before <data:post.body/>.
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="true" layout="button_count" width="450" show_faces="false" font=""></fb:like>
6. Now save your template and you're done !



No comments:

Post a Comment