Facebook Plugin Wordpress

Authored by Corey Ballou


Me Likey – A Facebook Open Graph WordPress Plugin

Download The Me Likey WordPress Plugin Now

UPDATED 06.14.10 8:52 pm

  • Fixed an issue with the shortcode handler calling an undefined function, thereby not registering shortcodes properly.
  • Fixed the screenshots on the WordPress Plugins page.

UPDATED 04.28.10 7:00 am

  • Resolved an issue with the admin id META tag.
  • Disabled the app_id parameter in the configuration until a FBML solution is implemented.
  • Added a “default image” option to the admin to be used when no post image exists.
  • Improved the preview mode to switch to a dark background depending on the layout choice.
  • Added comments to the admin options.
  • Modified the HTML namespace parameters to be included by the script, you must now ensure your header.php file uses the language_attributes() function:
<html xmlns="" <?php language_attributes(); ?>>

UPDATED 04.27.10 8:26 pm

A number of feature requests have been fulfilled.

  • An AJAX preview mode is now available in the options for a quick preview of the button.
  • All META tags are now populating correctly.
  • Fixed parameter naming issue with META tags (replaced “name” with “property”)
  • Additional options have been added to the configuration page; height, layout, show faces, and the ability to define your own custom class for the iframe.
  • Fixed the handling for populating the description meta tag. The code now attempts to get the excerpt first, then the first 255 characters of the post, and lastly the blog description as a fallback.
  • A few other minor issues were resolved which I found while implementing feature requests.

UPDATED 04.27.10 8:00 am

A number of issues with the admin options were found which would hinder you from modifying certain default settings. This has been resolved and the .tar.gz file has been updated accordingly. A couple of outstanding issues noted in the comments are being addressed. These issues include associated images not displaying on Facebook, no admin option for toggling between display methods, and the og:description meta tag not populating properly.

It is recommended that you add the following namespace parameters to your theme’s header.php HTML tag:

<!-- DEPRACATED. See code reference above. -->
<html xmlns:og="" xmlns:fb="">

I have dabbled with the Facebook Open Graph API for the past few days following f8 and eventually arrived at a full featured plugin for displaying Facebook’s new “Like” button functionality on your WordPress blog. The plugin is chock full of goodies, including:

  • Option of using either the standard or button_count (small) display mode.
  • Customizable width of the iframe containing the button.
  • The first included image of the post will be cropped to 50×50 and included in the user’s Facebook profile. (possibly broken)
  • Customizable placement of the button, which can be either at the top of your post, bottom of your post, or included using the php function me_likey_button(); in your theme files.
  • Ability to include the button within a post using the shortcode (BBCode) tag [like_button].
  • Ability to change the button’s wording to either “like” or “recommend”.
  • Customizable font family, including arial, lucida grande, segoe ui, tahoma, trebuchet ms, and verdana.
  • Ability to change the color scheme of the button to either “light” or “dark”.
  • Ability to enable/disable the button on a per post (or page) basis directly from the add/edit post screen.
  • Automatic inclusion of Open Graph meta tags to ensure your site is fully compliant with Facebook’s new handling.

Download The Me Likey WordPress Plugin Now

The plugin will have an official page shortly. Suggestions and feature requests are appreciated as I want to ensure the plugin is useable by all. For more details regarding Open Graph and meta data requirements, please click here.

Author: Corey Ballou

Corey Ballou is the CEO of Whether you're a student, young professional, entrepreneur, startup, or small business, you can be up and online fast with your own custom domain, email, and webpage on POP. Corey is a professional PHP developer by trade, specializing in custom web applications development for startups, small businesses, and agencies. Follow Corey on Twitter @cballou.

  • rinkjustice

    You’re just feeding the beast. You know that, right?!

    Look forward to trying it out 😉

    • rinkjustice

      I’m getting this error:

      Incompatible archive PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

      Any suggestions?

      • cballou

        Hey rinkjustice, I’m not sure how much assistance I can give you but I found an entire forum post on the subject: I’ll hopefully have the plugin listed in the wordpress directory in a few days and you won’t have to manually upload.

    • cballou

      Yeah, but I felt the need to get my feet wet and read some documentation in the process!

  • Tom Harnish

    Plug-in in admin list is named Ohhh-Pen Graph, Screenshot jpeg us empty (zero K), but the real killer is that when installed in loop the code me_likey_button() appears instead of button. Sumpin’ ain’t workin’ boss.

    • cballou

      I had originally considered using a different plugin name and not all of the code was switched over. Unfortunately I forgot to grep a few instances of Ohhhpen and they were left in by accident. Todays release is more of a beta than anything and I’m glad all the issues are being ironed out prior to going in the wordpress plugin directory. The empty screenshot was simply a placeholder for a later screenshot. I’m not exactly sure why you saw text output as opposed to the code. Perhaps you didn’t download the latest revision after I made modifications to the admin options page. I have tested all methods locally on 2.9.2 and they worked as advertised. Please let me know if you’re still experiencing issues after switching to the latest .tar file. I should also note that this plugin has only been tested on 2.9.2 and I can’t guarantee it works on any previous versions

  • Tom Harnish

    What does this mean to me?


    • cballou

      That code was legacy code pertaining to a different method I was considering using for gathering an associated image thumbnail in wordpress 2.9.2. I decided against that technique so that page is no longer pertinent. I have removed that comment from the plugin altogether to avoid confusion.

  • Tom Harnish

    Correct name now appears in plug-in list, typeof site is only requested once, and all the display positions now appear too—but ‘both’ doesn’t produce a ‘like’ button anywhere, nor does manual with the me_likey_button() as the last line in my header.php file.

    To be thorough, yes I’m using 2.9.2, yes I have a Facebook ID and App ID filled in and the were copy/pasted from my facebook/developer application info page.

    Happy to help by email with screenshots or whatever else might be useful.

    • cballou

      Tom, many thanks for your reports. I had not initially intended on having the plugin functional outside of the_loop but I can understand why people might want this option enabled. I have added conditional code to me_likey_button() which should allow you to place the function anywhere on your site and have it utilize “Like” functionality for the current URL.

      The number one cause of buttons not appearing within a post is that they have not been enabled. I decided to go ahead and automatically turn on Me Likey for all posts unless you edit the post/page and change the setting “Me Likey” to disabled in the right panel. I apologize for the lack of documentation. Hopefully this fixes some confusion and makes things run a little smoother.

      I possible second issue with the IFRAME not appearing may be related to the fact an explicit inline height was not set on the button’s parent iframe. The iframe has a class name of me-likey for styling and position purposes. I have updated the code to set this height at 20px, the height of the button. It can be overridden if you use an important tag in your stylesheet.

  • Tom Harnish

    No joy, something’s still amiss.

    me_likey_button() [like_button] now appears the beginning of each page and post and [like_button] at the beginning of each post—the former from the end of header.php, as before, and the latter from the beginning of post.php.

    Didn’t realize there was a me_likey button on right, as you surmized, but it doesn’t show enabled, and even when I do enable it and update post nuttin’ happens. See

    Keep it mind, of course,that it may be something I’m doing wrong . . . .

    • cballou

      Tom, the button now defaults to enabled to avoid confusion when user’s first activate the plugin. I’m not sure how familiar with PHP code you may be, but to use the custom (manual) display, you need to wrap your code in PHP tags:

      <?php me_likey_button() ?>

      You have to modify your settings to only use the custom (manual) display if you want the button to display on the page outside of the_loop.

  • Tom Harnish

    I’m suspicious of Facebook app set-up. Can you advise on “must have” settings that could be causing this problem if they’re wrong?

  • Tom Harnish

    Managed to add ‘like’ button using their iframe implementation, but of course I don’t have any of the customization features your plug-in would provide.

  • Pingback: installer le bouton « like » de Facebook sur wordpress en 2 minutes [how to] |

  • Dan

    Great plugin. Glad to see someone has implemented the meta information rather than just the button.

    Works great. Will there be a future option to have the button also give information about who likes the page (name, photo) rather than just a number count?

    • cballou

      Dan, your suggestions are appreciated. The next revision of Me Likey will definitely include the “Show Faces” functionality in addition to the ability to switch between the standard and button_count display methods.

  • Dan

    Just seen in the plugin options list above that there should be an option to have the standard button or the count button. I don’t have that in my admin options. Only the count button appears.

    And when I log in to my Facebook profile all I get is a link to the page I like and not “The first included image of the post will be cropped to 50×50 and included in the user’s Facebook profile.”

    Any suggestions?

    • cballou

      Dan, I’ll look into both of these issues this evening and get back to you.

      • Dan


        And once again, great plugin!

  • Dan

    Just a thought, but could the image problem be caused by the fact I use the postthumb plugin to handle the thumbnails on my home page?

    I also notice the button doesn’t display fully in IE8 (just a small crop off the bottom). Could be my crappy styling but it looks fine in IE7/Chrome/Firefox/Safari. Is there a height attribute in the CSS that can be adjusted?

    • cballou

      It’s a possibility that the postthumb plugin is causing problems. The easiest way to determine if the plugin is handling things properly is to use Firebug to check your page’s META tags for og:image being populated. WordPress 2.9 introduced new handling for post images which should mean you no longer need to rely on postthumb for your images. You might consider this as an option if you’re still having problems.

      The newest revision of the plugin now has a height option and defaults to 24px instead of 20px. This should alleviate issues in IE8 and give you total control over the button styles. You can also supply a custom class name to the IFRAME for user-defined CSS styles.

  • Dan

    Sorry, me again.

    The new features work great but when I click on the like button, it seems to accept it and show that my profile likes the post but then after a few seconds it displays an ‘error’ message next to ‘be the first of your friends to like this’ again.

    Any thoughts on why this happens?

    • cballou

      Dan, I just resolved this issue. It pertained to the ordering of the META tags in the header of the document. I also updated handling of the HTML namespace parameters so you no longer need to include them if your theme uses current best practices for the HTML tag.

      You may also experience the error message if you are currently using a caching plugin on your page. You would have to clear your cache through the plugin’s configuration section in order to test if this is the root cause.

  • mcpanic

    Thanks for the wonderful plugin. Love it. One problem I have in my blog is that the content is in Korean, and the admin page characters are all broken. Also in my wall displaying the ‘like’ status, the characters are broken as well. Any thoughts on this? Example:

    • cballou

      As of right now I don’t believe there is internationalization support for the text displayed next to the Like button as that code is generated directly by Facebook. I’ll look into this for you.

      Regarding the text in the admin section, there is currently no internationalization support. I would be more than happy to support additional languages if you (or anybody) would be willing to provide me with english to {language} translations.

  • Dan

    Hi cballou,

    I’ve updated to the latest version but still getting the same error problem. I don’t have any cache plugins installed.

  • Dan

    Okay, I’ve gone through all my plugins and disabled them one by one but still getting the same error message each time. I might have to revert to the original version because I know that worked.

    • cballou

      Dan, I checked your website and I believe your issue is in relation to the admin_id you have chosen. You must use the example given in the admin section for determining your admin id. You can either use the numeric number you find on your facebook profile or you could use your vanity URL username if you have one associated to your profile (i.e.

  • chris

    Great plugin so far…

    Thanks for adding the Specifically the “?s”, I don’t know PHP well enough to know to add them…

    But I do have a problem I can’t seem to get around. I am using the manual version and have it placed like so

    Print this post | Email this post

    Me Like

    Next story | Previous Story.

    The issue is the text “Be the first of your friends” has a hard return after “of” on a page with no likes and after the first “liker”. Is there something I can to to let it fill out the rest of the page?

    Thanks for staying on the bleeding edge of facebook!

    • cballou

      Chris, try adjusting (increasing) the width setting in the admin configuration options. This should fix the problem you are seeing.

  • Dan

    You are absolutely right!

    Thanks for checking out the problems for me. I’ll definitely recommend this plugin to everyone.

  • chris

    DUH… Thanks… totally overlooked that…

  • yoshi

    im getting this error.. page … could not be reached. once i click the like button

    • cballou

      Hey yoshi, do you have a sample page I could view this at?

  • do You like it

    Absolutely fantastic

    Thank You

  • Ian Byrd

    Thanks for this plugin! It’s working great for me, appreciate your work :)

  • Jonah

    Now, I can’t seem to get it to install. Says things like ‘resource not available’

    Any idea whats up?

    • cballou

      Jonah, where are you experiencing this issue? Is it with the actual download of the file? The plugin is available on the WordPress Plugins page so you should be able to do a search for Me Likey in your admin plugins section and install from there. Any details you can give regarding this issue would be most helpful.

  • Chris

    Works a treat for me! (in all browsers as well). I had trouble with other plugins but this one has worked first time. Cheers :)

  • Alex

    Hi, thanks for the great plugin!

    I’m just having one minor issue, but I’m not sure what the problem is. On my site, I’ve noticed that it seems to think there are twice as many people “liking” my posts as there actually are. So, for example on my most recent post, it says on my blog that six people like it. However, when I go to the Facebook admin page, really there’s only three people.

    Any idea how to get this to display an accurate count?

    Thanks in advance!

    • cballou

      Alex, I’ve received a similar response earlier today as well regarding the counts being off. I’m trying to see what kind of response I can get on the Facebook Developer forums and I’ll get back to you.

  • Jasmin

    i installed your plugin through wordpress plugin page.
    i want to insert the button manually, but it doesn’t show up
    i would appreciate your help!

    • cballou

      Hey Jasmin, couple quick questions:

      Are you trying to insert this button directly in your post or in one of your theme files? If it is supposed to go in one of your theme files, you would want to use:

      <?php me_likey_button(); ?>

  • Dave

    Hey mate,

    Thanks for this great plugin. Unfortunately, I’m having trouble using the shortcode [like_button]. When the plugin is set to Manual call and I use the shortcode in a blog post, the text “[like_button]” simply displays instead of the Facebook Like button.

    I’ve tried messing around with settings but to no avail. Any ideas?

    • cballou

      Hey Dave,

      I found a discrepancy between the copy on the WordPress Plugins homepage and the gzipped file I offered on the site. I fixed the error and repackaged the files for you. A quick upgrade to version 1.0.4 should fix your shortcode issue. Sorry for the inconvenience!

  • DaveUrsillo

    Beautiful. Thanks so much for your help and especially for the great work you put forth in offering this plugin to WordPress users.


  • DaveUrsillo

    Thanks for the update. Unfortunately I’m still having problems with the manual call. I’m not sure if it’s just me but I’m going to try some different things out.

    • cballou

      Dave, perhaps you downloaded a cached copy of the update. If you’d be so kind could you let me know which method you used to upgrade:

      1. Downloaded the file directly from the blog post.
      2. Upgraded the plugin to 1.0.4 through your WordPress Admin plugins page.
      3. Downloaded the file from the WordPress Plugins site and manually installed.

      This should be very easy to resolve once I know this info.

  • Melissa Cleaver

    Why is it that when I have this plugin set to see faces, the only one I can see is my own? I have a post here where 4 other people like it, but only my avatar is showing up. Here’s the link to the post I’m referring to:

    Please let me know what I’m doing wrong. Thanks so much!

    • cballou

      Hey Melissa, there are a couple of caveats to the “see faces” functionality which make it less than favorable in my opinion. Here is some information taken directly from the Facebook Developers page which may shed some light on why you don’t see any faces:

      “Since the content is hosted by Facebook, the button can display personalized content whether or not the user has logged into your site. For logged-in Facebook users, the button is personalized to highlight friends who have also liked the page.”

      To summarize, it seems as though they claim you’re only going to see profile pictures from your own personal friends group when you’re logged in to Facebook while visiting the page.

  • Frederick

    I like this plugin, I can’t wait to test it. Thank you

  • Ryan

    Thanks for the plugin. However I noticed that even if I select to turn off show faces it keeps being set to “Yes”.

    • cballou

      Ryan, thanks for the bug report. I’ll take a look at this in the evening and push an update.

  • Andrew Girdwood


    Pleased I moved to Me Likely; simply the best Like button solution I’ve found because you take care of the Open Graph / Facebook meta tags. Thanks for that!

    I think there may be an issue/bug with the most recent version though. In particular with the og:description property. It seems to be extracting code rather than a description.

    For example, for this page the meta tag reads;

    content="document.getElementById("post--blankimage").onload(); Related geeky posts:Matt Smith, as the Doctor, on the cover of Doctor Who magazine (17.782) Dr Who – Flesh and Stone – connected to the Time Wars game? (17.024) What role will the Eternal D"

    • cballou

      Hey Andrew, I appreciate the bug report. It seems as though Me Likey is picking up on some tags from within your post content. I’m not exactly sure why it found these as opposed to the summary or description, but I’ll definitely have to take a look. In the meantime, I’ll also be resolving issues with entity encodings. I’ll keep you posted!

  • Curtis

    Great plugin thanks! I notice that when a user “likes” a page, it creates a separate and new “Fanpage” that only I the administrator can see. Is there a way that all the “likes” on my whole site can be funneled to my main Fanpage?…is that articulate? not sure…:)

  • Peter

    Very nice plugin. The only problem I’ve found is that page titles with special characters (like swedish åäö) are not correctly posted to Facebook.
    Other FB-plugins have the same problem, but it really should be possible to solve or?
    Please HELP!

  • Matt

    Great plugin however we have a multi-site setup in wordpress 3.0 and would like to take away the option for the to select if they want to enable it per page/post. is it possible to take away the option in the post and page editor?


    I realize this is a great option for most even myself but we just don’t want our lower level users to have this option.

    • cballou

      Hey Matt,

      I’ll definitely take a look into adding this functionality in the next release.

      • LKamms

        Can you tell me some reasons why the Like button will appear, but upon clicking, it will not register a ping in Facebook? The “1 Person” shows, stays for ten seconds, then disappears leaving the Like Button as it was.

        I added my client’s FB user name correctly, plus I used Thesis open hook to append the Header hook with language attributes code.

        <html xmlns="; <?php language_attributes()

        Oddly enough, this worked last week for one day. I have not made any changes to the open hook or header since then. Re-inserting the code, and pressing the Little Save button did not make it refresh and suddenly work again.

        What can I check next? Thanks,


        • Corey Ballou

          Hey Laura,

          Let’s see if I can’t help you out. I viewed the source of your site and found that your fb:admin field is set incorrectly from the admin. The value is currently set as Tropical-Birding/93571392426?ref=ts but I believe the value you are looking for is 93571392426. Also, if this value does not work, I would suggest determining the Facebook user account that runs the page and using their user id.

          After you have updated the fb:admin from the Me Likey settings page, you will need to “Like” the page with the login credentials of the Tropical Birding user. Hope this helps.

  • LKamms

    Thanks for your attempt to help me. I did what you said: ” I believe the value you are looking for is 93571392426. I would suggest determining the Facebook user account that runs the page and using their user id. After you have updated the fb:admin from the Me Likey settings page, you will need to “Like” the page with the login credentials of the Tropical Birding user.”

    I confirmed the user ID was the long # starting with 9
    i entered it into the console Me Likey settings
    I saved it.
    I went to a page and clicked LIKE and it took, but then the “1 person” disappeared again.

    I asked client to login to FB as account user, then Like a page.

    Same thing.

    Again, the odd thing is that this did work for me one time. It translated into a notification on my FB page.

    Anything else I can do? Many thanks…


    • LKamms

      Hi there,
      My client’s site is due to launch in a few days, so thought I’d make one more attempt to resolve the Me Likey button issue (described above) or I’ll have to delete this excellent idea of a plugin!

      If you are willing to offer me support, send me an email at laurakamms [ at ]
      Thank you very much!

  • MobileGround

    Hello cballou :
    i have the same problem that Dave faced .. when i use the short codes its just appear
    [like_button] instead of the facebook button
    i have the latest plugin version 1.0.5

    • Corey Ballou

      Thanks for the notice, I’ll let you know by email if I find a problem and get this resolved.

    • Nina T

      I am trying to set up a new site, and having the same problem as others: when I use the shortcode [like_button] in a post I get EXACTLY that… no button, just the plain text.

  • Charlemagne Web Designs


    There appears to be a problem, possibly not on the plugin’s end, with the implementation of the code.

    I have been using this plugin just fine for months for two sites but all of the sudden, I noticed this error coming up when the Like button is pressed:

    [i]The application ID “60567011104” specified within the “fb:app_id” meta tag was invalid.[/i]

    (Where 60567011104 is one of the site’s Facebook ID’s)

    It seems Facebook is now demanding the Application ID be passed along as a parameter, but since the plugin has that value disabled by default in the plugin’s admin interface, there is no way to pass the Application ID in the call.

    This is confirmed in version 1.0.5.

    Please advise.

  • Adam

    Hi, for some reason the plugin started echoing my posts’ tags into the description meta tag. Any idea why?

  • Victor


    Just a simple question, how can I change the “Recommend” to “Recommander”?
    I tried to change the php code, but it didn’t work.

    Congratulations for your work, seriously.

    Thanks in advance,

  • Skip

    Hey, like the plugin a lot, thanks for building it.

    It would be great if there was a way to have different php calls for different configs. In other words, if I wanted it to use recommend with standard, I call me-recommendy-long or something. If I want just like with the count, I call me-likey-short().

    Just an idea because I want to use different looks on our home page versus the entire post template.

    Thanks again.

  • Kermit Woodall

    I’m having problems with Me Likey working passing the proper URL specifically:

    But what it actually puts in the URL to like is:

    Any ideas?


  • Vatih

    This plugin is working perfectly! Awesome…
    For a long time i try to find the LIKE button that can showing up the content on the wall feed.. Very useful.. LOL 😀