WordPress Plugin: Basic Facebook Social Plugins

Today, I saw that Facebook introduced some new features, and one intriguing feature is called “Facebook Social Plugin“. It would be very interesting to have blog posts to be simply “liked”, and having information displayed about activities and recommendations related to your website.

So I decided to take 30 minutes of my break time and write this simple plugin. Since I don’t have much time I decided not to explore XFBML and the SDK as yet. That is why it’s called BASIC. With XFBML, shorter codes can be used, and deeper integration between Facebook and your website can be achieved. I am intrigued, really but I must be realistic.

This plugin is a very simple plugin to embed :

  1. “like” button at the end of your articles/blog posts
  2. activity feed as a widget
  3. recommendations as a widget
  4. Like box as a widget

You can add these cool features with minimal effort.

Most configuration parameters are self-explanatory, but Domain Override simply means you want to display information about another domain instead of where the widgets are hosted. By the way, the widget settings are combined in the Settings > Basic Facebook Social Plugins page.

At this moment this plugin is still waiting to be hosted at the official WordPress Plugin Directory so it can only be downloaded here.

  • Basic Facebook Social Plugins Version 1.0
  • Basic Facebook Social Plugins Version 1.1 * This version will wipe out previous widget settings as it introduces multiple instances of widgets.
  • Basic Facebook Social Plugins Version 1.2

Once available there, a link will be provided. When it’s there, It’s now in the official plugin directory (basic-facebook-social-plugins) so you should be able to install it using the automated, built-in plugin installer too.

You can see the sample for the like button at the end of this post, and the widgets live on this site.

The widgets does not conform to your theme (does not inherit your theme css) but simply bare boxes with Facebook feel. Take note that styling inside the boxes (and texts) are provided by facebook.

Those of you who are concerned about privacy, you’ll be glad to know that your name and profile picture will not just be displayed to anyone:

25153_430469086728_20531316728_5233502_2779746_n

(This also applies to recommendation and activity box. Only friends will be able to see that you like something.) Facebook has thought of everything.

Try it out and let me know how it works for you.

Shots from Facebook:

25153_430468906728_20531316728_5233495_6137188_n

25153_430468866728_20531316728_5233494_4789969_n

Facebook has also written a nice post about social plugins in their blog: Answers to Your Questions on Personalized Web Tools.

Note:

  1. This WordPress plugin is written entirely by me, and is provided as-is with no guarantee. It is neither approved nor endorsed by Facebook.
  2. Yes, it is breakable by Facebook if they decide to change the iframe URL.
0 Shares

8 thoughts on “WordPress Plugin: Basic Facebook Social Plugins”

  1. Nice job on the plugin. Just put it on my site and there’s a good chance we’ll mention it on the show (Social Blade Show) tonight since we’re going to be covering many of the new facebook changes. 🙂

  2. im currently using it.. great plugin.
    but i think there is a limitation by FB.
    when two or more person like it, it will appear as:- Person A and Person B both like this.
    It would be better if it appear like :- Person A, person B and 2 others like this.

    1. I think they have something in mind. When 4 friends like it, the Person A and Person B are displayed randomly.

      Or, perhaps there’s a bug. When opening this post with a fresh browser (no facebook cookie) it says “2 people like this”, while I know there are 4 likes for this post. Hmm. I hope they are reading this as I really have no idea on who to contact to report this issue.

  3. On my site (using wordpress 3.0) there is a lot of dead space between the like button and the beginning of the tags that appear at the end of a post; any recommendations on how to reduce this blank space?
    Thanks and great plugin!

    1. Matthew, this has been fixed in 1.3

      The problem was that the iframe was not given a “height” value, following the inability from the original Facebook code builder. I have added the ability to add a height setting, in case people would like to change it.

      25px is ideal for a wide frame, but if width is set too low then height might need to be increased.

    2. I just noticed that the whitespace is actually used to display the thumbnails of viewer friends who liked the page. I now set mine to 65 to display one row of friends. Setting it to 25 will simply hide the thumbnails away… no other effects observed.

Comments are closed.