Update: There’s a better social sharing plugin you can use on your blog here.
Facebook like button is probably the most important facebook integration to socialize your blog. It allows your blog content to be shared with the click of a button without leaving the page. I recently wrote a post on creating a facebook fan page and adding a like box to your blog and I suggest you check it out if you haven’t. Adding facebook like button involves just a couple of steps easy to implement. You can add a like button for your fan page or a like button for each and every blog post. There’s an old post I made on adding facebook like button to blog posts but this one explains it even further.
ADDING LIKE BUTTON TO EACH BLOG POST
This makes it a lot easier for your readers to share your blog posts with just a click. To add facebook like button to every blog posts automatically, follow the steps below:
1. Login to your blogger account and select Design
2. Click on Edit HTML
3. Check the box labelled Expand Widget Template
4. Like I always emphasize, back up your template before making changes in case something goes wrong
5. Press CTRL + F and search for <data:post.body/>
If you’re using a magazine style template or used the automatic read more hack I posted, you might find two or more <data:post.body/> in your template. You should try both to know which one works. The second works on my template though.
6. If you prefer to have the facebook like button to appear on top of your blog post right below the title, paste this code above <data:post.body/>
<b:if cond='data:blog.pageType == "item"'><div><iframe allowTransparency='true' expr:src='"http://www.facebook.com/plugins/like.php?href=" + data:post.url + "&layout=standard&show_faces=false&width=100&action=like&font=arial&colorscheme=light"' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:400px; height:27px;'/></div></b:if> <br/>
7. If you prefer to see the like button below your blog posts, paste this code below <data:post.body>
<br/>
<br/>
<b:if cond='data:blog.pageType == "item"'>
<div><iframe allowTransparency='true' expr:src='"http://www.facebook.com/plugins/like.php?href=" + data:post.url + "&layout=standard&show_faces=false&width=100&action=like&font=arial&colorscheme=light"' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:400px; height:27px;'/></div>
</b:if>
<br/>
8. You might as well put it in both positions. Save your template and view the change on your blog.
Note:
You can change the layout written in red which is set to standard by default to button_count if you want the like button to show number of likes instead.
You can as well set show_faces which is false by default to true. This enables the like button to show photos underneath but it applies to the standard button only.
The code above too only shows the like button on post pages. It won’t appear on static pages like label search results and home page. To make the like button appear on static pages involves removing two lines of codes: <b:if cond=’data:blog.pageType == "item"’> and </b:if>.
With those removed, the facebook like button appears on static pages and on blog post pages as well.
MAKING FACEBOOK LIKE BUTTON LINK TO YOUR FACEBOOK FAN PAGE
In case you prefer a simple facebook like button that links to your facebook fan page instead of a bogus like box, there’s a slight change than can be made to the code above. You only need to change the URL as shown below:
<b:if cond='data:blog.pageType == "item"'><div><iframe allowTransparency='true' expr:src='"http://www.facebook.com/plugins/like.php?href=FAN PAGE URL HERE&layout=standard&show_faces=false&width=100&action=like&font=arial&colorscheme=light"' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:400px; height:27px;'/></div></b:if> <br/>
You should change FAN PAGE URL HERE to you own facebook fan page full address. Be sure the URL starts with http://. You can also place this code before or after <data:post.body> as explained above.
Alternatively, you can add this as a widget by going to you blog’s layout and clicking on add widget on the exact position you want the like button to appear. Select HTML/Javascript and paste the code below:
<div align="center"><iframe src="//www.facebook.com/plugins/like.php?href=FAN PAGE URL&send=false&layout=standard&width=200&show_faces=true&action=like&colorscheme=light&font&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:80px;" allowTransparency="true"></iframe></div>