How to add Facebook’s like button to WordPress

At the 2010 Facebook F8 developers conference in San Francisco, Mark Zuckerberg announced the new Facebook Open Graph API. One component of this new API is to allow third party websites such as this to embed a Facebook LIKE button. In this article, I’ll show you a simple way to add this feature to your WordPress sites. Let’s first talk about what this button does and why you might want to add it to your site. On the most basic level, a Facebook ‘LIKE’ button can be added to the bottom of every post and page. If you click it while logged into Facebook, your Facebook avatar will be added with a link to your Facebook page. A new wall post will be added to your Facebook account that will read something like this “Jennifer likes Are you a bad parent? | on”. There are other more sophisticated implementations being used by Facebook’s partner sites like that further integrates a particular selection.

Why would a website publisher want to add this feature? Well in a word: exposure. There are many ways to get exposure for your site content. If you look at the bottom of this article, you’ll see a series of icons allowing you to share this article with many sites like Facebook,,, or For year, websites have had icons to email content to their friends. So what makes the Facebook ‘Like’ button so different? Well Facebook’s 300+ million users is the difference. Now don’t get me wrong. I’m not saying someone clicking your ‘Like’ button will magically get your site in front of 300+ million viewers. If the Facebook user who clicked that button only has his mom as his only friend, it may just go out to two persons. The Facebook ‘Like’ button is not a replacement for other forms of social media distribution. It’s not going to replace Twitter or Digg but it is a great complement to those existing sites. When I publish a new article, I already post it to Twitter and my Facebook wall so anyone I’m already connected to will be able to see that. What the ‘Like’ button does is expand that audience to those you cannot currently reach on Facebook. Anyone can click the ‘Like’ button so unlike your Facebook wall post, it is not limited to your Facebook friends. This potentially can have huge impact on reaching new audiences. Unfortunately, the Like update only goes one way from your site to Facebook. If you post a link to Facebook and someone clicks Like on Facebook, that Like will not update to your link.

Now on to creating the button. To add the ‘Like’  button to a single webpage, all you have to do is generate the code using the tool Facebook provides. But that code won’t work on WordPress. For self hosted WordPress publishers, there are two plug-ins available. AJ Batac has created a WordPress plugin that allows you to easily integrate the ‘Like’ button after all your content. The plugin can be downloaded here. Simply unzip and ftp to your plugin folder. Once you activate it, you will see the button added to your posts and pages. That’s it. It’s simple and takes about 60 seconds. This second one has a few more features including the ability to place the ‘Like’ button on top.

Update: Since writing this posts, there has been over 20 new Like plugins for WordPress. After trying a few, I am currently using this one.

Learn more about your Facebook privacy settings.

Facebook Like Button and Your Privacy Settings
View count