About
Contact
Archives

How to add the Facebook Like button on your blog

Friday, April 30, 2010, 1:32 pm

If you haven’t heard the buzz Facebook recently released their Social Plugins. In their words:

Social plugins let you see what your friends have liked, commented on or shared on sites across the web. All social plugins are extensions of Facebook and are specifically designed so none of your data is shared with the sites on which they appear.

Out of many different choices, the Like button is my favorite. First it looks nice and clean as you can see below this post. Second it gives you instant promotion. Everytime a user clicks on it your post link will be posted on his/her Facebook profile.

Are you sold yet? Ok here’s how to add it on your blog. Just copy and paste this block of code under your post template:

<iframe src=”http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink()); ?>&amp;layout=standard&amp;show-faces=true&amp;width=530&amp;height=60&amp;action=like&amp;colorscheme=light” scrolling=”no” frameborder=”0″ allowTransparency=”true” style=”border:none; overflow:hidden; width:530px; height:60px”></iframe>

And you’re done. You can modify the settings here if you need to customize it. And if you have problems feel free to comment below and I will try to help you.