How to Really Use Facebook ‘Like’ Feature for WordPress

Facebook’s Like button has been in the news since its release in March. It has had its share of criticism from privacy issues to value creation questioning. Nonetheless, the web has adopted Open Graph Protocol and the Like button at rapid pace.

Does it really benefit your blog?

Like every new hype, most people are implementing the Like button without really considering the usefulness of doing so. A question to ask often is if the Like button is really a good fit for your blog.

There is much talk on the subject, however, most will convince you that it’s as easy as users sharing the links and their friends getting exposure to the links right away. It’s not always the case, unfortunately.

First, let’s sprint through the basics.

What happens when someone “Like” an article
It appears in the following places but there are limitations and conditions:

  1. User’s Wall – “Recent Activity” — Very few people see this.
  2. Friends’ News Feed — However, it depends on Facebook’s EdgeRank algorithm — Not everything will make it to all of your friend’s News Feed.
  3. User’s “Likes and Interests” — For any Open Graph object that’s not an article or news tidbit. (More on Objects below)
  4. User can receive updates in their “News Feed” — Sent by the hidden page admin. It works only if an admin is specified while implementing the Like button code. It also requires a more complex setup to be able to update the fans all your Liked pages.

So, it’s useful?
While some blogs do find it useful, many small traffic blogs just don’t! I suggest that you read on, get a better understanding and form your own opinion.

How to benefit from it?

Rely on Likes appearing in “News Feeds”
Theoretically, whenever a user Like something on your blog, it gets posted on his/her friends News Feed too. But recall that not all updates or Likes by a user will reach all of his/her friends. It entirely depends on the Facebook’s EdgeRank Algorithm.

For some blogs where the content really suits the social users, this alone might be very useful. However, more can be done.

Send interesting updates
When implemented correctly, you can send updates to all the users who ever liked a post on your blog. Whenever users Like a post on your blog, they automatically become a Fan of a hidden facebook page which is considered as an Open Graph object. While they can receive the updates in their “News Feed” posted by an admin of this page/object, the object name will link to your blog post instead of a facebook page.

The issue here is, a blog can easily have hundreds of posts. Each post is considered an object and each object has it’s own individual page to send updates from. Manually visiting each page and posting the update for hundreds of pages just isn’t realistic. To update all fans of all objects/pages, you’ll have to do it programmatically. This requires you to register and use a Facebook Platform application. Unfortunately, I have not found a WordPress plugin that can handle the programmatic updates for you. You will have to get it custom built.

Most people don’t realize they’re subscribing to receive updates when they Like something on your blog. So use this wisely; make your updates least spammy as possible or they may as well Dislike your blog.

Again, remember that there’s no guarantee that these updates will appear on all your fans’ News Feeds. Facebook’s EdgeRank Algorithm calls the final shots.

Use it with Recommendations plugin
If you have a blog with many facebook users and a decent overall traffic, you can implement Like button with other facebook social plugins such as the Recommendations box.

The social recommendations box is usually added to the sidebar to show popular relevant content to your users. Your users will see posts that their friends like (liked or shared), whenever they are logged into facebook. When they’re not logged in, they’ll see posts that are, overall, most liked or shared from your blog.

Everything is an object
If you are using WordPress in such a way that every single post/page is a unique object (unique product pages, movie or celebrity pages, for example), then you can mark it as such. Having pages as objects make them appear categorized in user’s “Likes and Interests” under relevant category.

To implement you can define the og:type tag using one of the supported types. Perhaps you can use tags, categories or taxonomies here. Since this is a rare case, I do not have concrete implementation examples here.

How to add Like button on WordPress

It depends upon your requirement.

Updates and hidden facebook pages required?

Whether or not you setup a custom system to handle programmatic updating of your News Feed, you still need the basic meta tags in place. This will ensure that you can Like your own pages, and then be able to Administer and post updates via them. I recommend Like plugin in the WordPress plugin repository.

No News Feed updates necessary?

Perhaps you use a Fan Page instead. Or perhaps you are not interested in feed updates at all. In this case, the implementation is pretty simple.

Here, you have two choices as well.

The xfbml advantage
It’s more complex, but when the user presses the Like button, a small comment box is display. If a user enters a comment, this not only increases the chance of displaying in user’s friends News Feed, but also is displayed more like a normal update posted by the user. This makes it significantly more useful especially if you’re relying on News Feed exposure alone.

PangPond has a nice article explaining the difference.

To setup on WordPress, you will have to register a facebook application and then use the Like plugin.

Quick, and less complex
Or you can quickly get it done.

  1. Open single.php and place the following code where you want the Like button to show.
    <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px;">
    </iframe>
    

    Note that you can generate the same code at Facebook but replace href query parameter with a value of <?php echo urlencode(get_permalink($post->ID)); ?>

  2. Save, close and test.

Common Questions

How to send updates?
Like any page on your site. Next, refresh the page to see an Admin Page link. Clicking on the link will take you to the hidden page where you can see all the relevant page. Please note that it will only work if you had specified the correct user id in the fb:admins meta tag, i.e. configured it properly in the plugin.

All the pages that you Like, and those that you can Administer can be managed by clicking the Account menu at top left of your facebook account and then clicking Manage Pages. Note that Manage Page only appears when you are admin of at least one page.

How to install the facebook Recommendations social plugin?
Go to the official code generator. Copy the code into one of the widgets in your WordPress or modify the theme’s sidebar.php manually.

Keep In Touch!

Like it or hate it, Facebook is clearly one of the marketing tools of today. Use it, experiment, learn, adapt and please remember to share your experience.

Don’t forget to subscribe to our RSS Feed and follow us on Twitter to stay updated.

4 Comments
  1. Hey, I’m crating a blog and I installed a facebook like plugin. It appears fine in the home. The problem is that I wanted it to appear on the full posts in the categories part too, but it doesn’t.
    Do you know how to fix this?
    TIA, great article.

  2. This is just amazing stuff to read, and the code you mentioned is simple and straight forward. Great blog!

    Frank Edens

  3. I tried it and it worked but as soon as I signed out of Facebook My blog had this message in its place.
    The page you are trying to access is restricted or unavailable.Been working on this for a few hours now.
    I give up.Its not that important to me to be wasting all this time not to mention the stress it causes.
    Any help from you guys would be appreciated though.

  4. Fantastic, I’ve been wanting to add a Like button for a while for my own Wordpress site – thanks for the tip and the code.

Leave a Reply