During the F8 Conference, Facebook announced some of their new social plugins that can be used on any website. This of course includes all the WordPress powered blogs out there. To add the like buttons to your site, follow these simple steps:
First, we look at the “Like Button”. The Like button lets users share pages from your site back to their Facebook profile with one click. To add the “Like Button” to your pages/posts:
1. Go to: http://developers.facebook.com/docs/reference/plugins/like
2. Ignore the URL field, but enter the remaining options.
3. Click “Get Code”, and you will have two options to implement the “Like Button”. One option is to simply use an iFrame, or XBMFL (which will require you use the JavaScript SDK).
4. Open your single.php file in your wordpress theme folder, and paste the code. Make one change to the “href=http://developers.facebook.com/”. Remove that, and replace with <?php echo get_permalink(); ?>
5. That’s it!
Side Note:
Add a “Like Box” (for your fan page) on your website so that visitors can easily become a fan. The Like box enables users to like your Facebook Page and view its stream directly from your website.
1. Go to: http://developers.facebook.com/docs/reference/plugins/like-box
2. Enter your Facebook Page ID, and click “Get Code”
3. Paste the code in the desired spot on your website.
