Add Facebook Like to WordPress

Add Facebook Like to WordPress

Facebook released Social Plugin in their recent F8 conference.
It lets you see what friends have liked, commented on or shared on sites across the web.

The Facebook button enables users to post pages from that site back to your Facebook profile with one click

I added Facebook button manually to a client WordPress site. It uses iFrame tag, because it’s very easy and doesn’t need JavaScript SDK required by XFBML tags.

Add the following code to WordPress theme or your WordPress posts or pages via HTML editor in WP backend

<iframe src="http://www.facebook.com/widgets/like.php?href=<?php the_permalink(); ?>" style="border: medium none; width: 450px; height: 80px;" frameborder="0" scrolling="no"></iframe>

You could change width:450px or height:80px to fit your site