For different reasons, you may want to put a Facebook like button on some or all of your website or blog pages or posts. By like button, I don’t mean the like button for a fan page, I mean a specific like button for each page or post.
But whichever way round, the required technique is nothing but easy. Just read carefully to see how to add a like button for a page, post, website or even a WordPress or Blogspot blog.
Adding Like Button On PHP Enabled Website
This code will work perfectly on any site hosted in a PHP enviroment. Just add the following code anywhere disirable in the script file to call a like button.
Adding Like Button On Blogspot Blog Posts
Go to your Blogger dashboard, click on Blog> Design> Edit HTML.
Paste the following code, perferably after <b:if cond=’data:blog.pageType == “item”‘> to make the like button visible only in blog posts.
Click on Save Template.
Adding Facebook Like Button To Self-hosted WordPress Blog Posts
Login to your WordPress dashboard.
Click on Appearance> Editor > Single.php
Place the following code just after <?php the_title(); ?>
Click on Update File to save.
How To Display A Facebook Recommend Button
Change the parameter &action=like to &action=recommend to display a ‘Recommend’ button instead of a like button in any of the above codes.