WP Facebook Like
WP Facebook Like makes it easy to integrate the Facebook Like button with your WordPress site. Choose to automatically append the button before or after the content, or use a template tag to place the button where ever you want.
Quick features
- Fully automatic — just install and enable the plugin
- Easily place the button before or after your post
- Choose to disable the button on the front page
- Custom settings available, including a shortcode and template tag
- Full language support for the Like button
- XFBML and Open Graph support
The button will automatically be inserted after the post, but if you want the button to appear before the post, change the color or make the plugin only show the button and no faces, make those changes in the settings panel.
To see all available settings, have a look at the options screenshot.
To manually include the Like button in a post or page, set the plugin to disabled in the settings and include the [ wpfblike ] tag within the post.
If you are a template developer, you may include the button where ever you want, as long as you stay within the WordPress loop. Just call the wpfblike() function and echo the output to the correct place for your theme.
Note that WP Facebook Like currently only supports PHP5.
Template developers
If you are a template developer, you may include the button where ever you want, as long as you stay within the WordPress loop. Just call the wpfblike() function and echo the output to the correct place for your theme.
You can optionally pass arguments to the function if you want different settings for default button. To get a default button, write the following:
<?php echo wpfblike(); ?>
To get a button with the count layout:
<?php echo wpfblike('layout=button_count'); ?>
You may concatenate multiple options as such:
<?php echo wpfblike('layout=button_count&colorscheme=dark&action=recommend'); ?>
The following options and values are currently recognized:
- layout (default, button_count)
- show_faces (true/false)
- colorscheme (light/dark/evil)
- width (in pixels)
- action (like/recommend)
Refer to the options page for the plugin for a description of all options.
Translations
Please contact me to include your translation of this plugin. Do consider contacting me before starting to translate as well, so you know if anyone else has already started
Screenshots
Installation
The easiest way to install this plugin is to go to Plugins -> Add New in your WordPress admin and search for “wp facebook like”, and click the install button.
To manually install the plugin, upload it to your wp-content/plugins/ directory of your WordPress installation and activate it from the admin page.
Download
Help!
If you have any questions or suggestions regarding this plugin, you can either write a comment to this page, or contact me directly.
Changelog
1.3.9 (2010-06-04)
- Updated screenshots to reflect new settings
1.3.8 (2010-06-04)
- Fixed a bug where you could get “You do not have sufficient permissions to access this page.”
1.3.7 (2010-05-24)
- Added support for settings a custom priority for the automatic button embedding.
- Added support for automatically insert the button both before and after the article.
1.3.6 (2010-05-16)
- Added support for entering a custom CSS style.
- Added support for passing custom arguments from the template tag.
1.3.5 (2010-05-13)
- Added an option to use the default Facebook height. Just leave the height option blank in the settings for this to take effect.
1.3.3 (2010-05-12)
- Added support for entering a custom height for the like button, which can be used to trim excess whitespace after the button.
1.3.2 (2010-05-12)
- Fixed a bug which could invalidate the RSS feed. Thanks to Simon Salt for the notification.
1.3.1 (2010-05-11)
- Fixed versioning mistake.
1.3.0 (2010-05-11)
- Added support for disabling the automatic inclusion of the Facebook Javascript SDK.
- Added full Facebook language support.
- Added support for Facebook Open Graph.
1.2.0 (2010-05-10)
- Added support for entering a Facebook Application ID, enabling the comment box.
1.1.0 (2010-05-08)
- Added option to choose permalink type. Good if you want the button outside the WordPress loop
- Added help text to all settings on the options page to make it easier to know what to do
- Added support for internationalization. To contribute a translation, contact me at the the plugin website.
- Added option to choose to only show the like button on single posts.
- Fixed Removed double URL encoding
1.0.4
- Fixed problem with Internet Explorer
1.0.3
- Choose between the xfbml or iframe embedding method (xfbml is default)
- Choose the button text
- CSS class description
-
Updated options screenshot to reflect the new settings
1.0.2
- Made the plugin insert the button after the post by default
- The options page is now much easier to use
- Updated the options screenshot
1.0.1
- Initial release
Trackbacks & Pingbacks
- Facebook Like Buttons für Joomla, Drupal und WordPress
- Wordpress Plugin for Facebook Like Button
- WP Facebook Like 1.1.0 released | Johnny Chadda .se
- Updated the Facebook Like button for WordPress | Johnny Chadda .se
- WP Facebook Like 1.2.0 released
- WP Facebook Like 1.3.1 released
- Facebook – “Like” / “Gefällt mir” Button PlugIn für Wordpress - Like, Facebook, PlugIn, Button, Wordpress, Link, Gefällt, Hersteller - ITler.NET - Der Blog für ITler und Sysadmins
- Axleration » How To Add Facebook Like Button To Your Blog
- Acht kostenlose Facebook Plugins für WordPress
- Problems with the Facebook Like API | Johnny Chadda .se
- How To Add A Facebook Like Button (The Basic Version) | WhatClinic.com





Left you some thoughts on this plugin here: http://wordpress.org/support/topic/394294
Thank you for your input!
There could be a problem changing the class name now that it’s out there, but if people are having problems, I’ll definitely change it. I will look into the boolean strings as well.
I was thinking about implementing some options for only enabling the button on posts, pages, not the front page etc, for the next version.
I need it so much. When it will be available?
It’s coming soon. I will try to get an updated version of wp-require-auth out this weekend, and hopefully an update to this plugin next week with support for enabling on posts/pages etc.
Thanks! It took me three tries to find a like button plugin that I, well, liked. I was won over by how easy it was to change the location of the button.
Love it!
does this plugin work on PHP 4?
Nice looking site btw
Thanks!
I am guessing that there could be potential problems running on PHP4, but I would have to verify.
I would urge you to upgrade to PHP5 though if possible, since PHP4 is not supported since 2008 and there are no security patches made since.
thanks for the info. Pestering my host provider right now
Yes – this requires PHP 5. Plugin doesn’t even show up for me otherwise.
Shows up and works great when 5 is installed.
Ability to echo the output anywhere you want makes this the best Like plugin imho.
Went the manual route initially with the Like button and Facebook scripts and just got annoyed.
Thank you!
I can probably make the plugin compatible with PHP4 if there is any reasonable demand for it.
Awesome plug-in!
Two people has liked my post, but I can’t see who it is, is there any way I can find out?
For this, you would need to set up your own application within Facebook. I will add support for this in the plugin and instructions for creating the application in Facebook in an upcoming version.
I want to know how to do that too !
When I tried to set up my own application within facebook they say that my URL is wrong. Do I write my web adress or facebook address or what? Im Lost
thx.
You should enter the URL to your website. If it is the website you provided when you submitted this comment, it should simply be http://www.majlov.se/
Hey, I have a problem..2 actually.
When someone “Likes” on of my articles on my blog, then on facebook it appears ” user likes content on content
and the second one:
I don’t get the “comment form” when I press “like”
what did I do wrong?
Hello.
1. Not sure why that happens, but I will look into this. I will probably insert the open graph headers on the page instead of relying on Facebook to grab the title (if you want to know the details), for the next version.
2. That is because I haven’t released that feature yet. It requires the website to have a Facebook application, but I will release an update to the plugin very soon (hopefully tonight) which will include this functionality, as well as instructions for setting up an application in Facebook.
Facebook, resolved the whole “content” thing, I don’t know if it was something I did or just something random.
Nevertheless waiting for the comment thingy
)
I got 2.0, it seems it only happens to me, the owner of the website and facebook profile
)
A friend “liked” an article for the 1st time and it worked for him.
Seems to be something with the owner of the blog/facebook account
I don’t know if the comment went in moderation, I wasn’t paying attention, but as I said, a friend “liked” an article for the 1st time and it worked for him
)
it must be something with the blog owner’s facebook account.
@somnulescu the thread got all screwed up when I changed the maximum recursion level. The comment is there, just not at the bottom. This is a new thread.
Thanks for the info. I haven’t had this problem myself, but I will try to find out what’s causing it.
great, these threaded comments forms are wobbly
)
if you have an answer please leave a comment here.
http://www.facebook.com/connect/connect_to_node_error.php?title=No%20administrators%20were%20specified…..
Did you try setting an application ID, or did you leave it as default? Do you have other Facebook plugins running simultaneously?
I had to deactivate this plugin as it screwed up my RSS feed completely. It is adding white space and has invalid XML syntax in it. You definitely need to fix this before it can be used properly.
Thanks for the catch! It seems that it includes the Facebook SDK in the feed for some reason.
I’ll release a fix asap.
Version 1.3.2 of this plugin is just out, which should fix the RSS problem. Thanks again for bringing it to my attention.
Trying to figure out why it puts so many spaces after the function call. It adds around 4-5 blank lines every time you do
Any ideas?
The problem seems to be on the Facebook side. I will add a height option in the plugin to override the default height from Facebook.
An update to the plugin will be out shortly. Thanks for the suggestion!
Version 1.3.3 is now available, which includes a height option that can be used to remove empty space after the button.
damn.. that was fast. I’ll test.
Hi John, thanks for the creation!!
if seems like this bikinsitusweb.co.cc (im sorry!), is that indicated the plugin works?
Hello there and thanks! I am not entirely sure what you mean. Could you please rephrase?
my mean, does the plugin work correctly in this blog http://www.bikinsitusweb.co.cc ?
Yes, it seems to be working correctly.
Hello, I am using your plug-in and it’s great.
Is there an option to show all the faces? Currently it displays 4-5 faces but not all.
Thank you
Maurice
Thanks!
It will currently only show the faces of your friends, and I’m not sure about the maximum number. This is done on the Facebook side of things however, and it’s nothing that can be controlled from my side I’m afraid.
If Facebook decides to change the current behavior, I will definitely include options for controlling it using the plugin.
Good plugin. Could you add template tags to select the button type (default or counter)? It would be useful if you want to have two buttons in one post – for example small counter button at the top of the post and default button with faces at the bottom.
Thanks! Sure, I will include that in an upcoming version.
Version 1.3.6 is just released, with support for entering custom settings to the template function. Refer to the article above for all settings, and in your case it would be something like this:
<?php echo wpfblike(‘layout=button_count’); ?>
Hi,
hanks for this great plugin …
it works fine, but does not update application fans on the simple facebook application I created.
I have entered the Application ID in the settings .. Am I missing something here??
Cheers,
Karthik
*Thanks [typo]
Thanks! I will look into this.
I receive a error when i click like.
It says the page at “http://post url” could not be reached
what can i do, please help me.
Hello. This seems to be a problem on the Facebook side and it should hopefully be working again soon. I am experiencing the same issue at this moment.
I will keep you posted on any changes.
Oh thanks friend,
so does all Like users are facing this problem ?
Facebook seems to have fixed the problem now, but I did find a bug in the iframe embedding method. If you please switch to xfbml, it should hopefully start working again.
I will submit a fix for the iframe issue later today. Thanks!
even if i switch to xfbml, i get the error buddy
what to do
It seems that it works in some places but not others, and it seems that it is not an implementation issue, since people not using my plugin are experiencing similar issues right now.
I will keep you posted.
the facebook like widget was working for me till yesterday, today morning when i used this, it is showing me an error.
Also when i post links of my website in facebook, it is detecting only the title and url but till yesterday it was able to detect the images and the description too.
wondering why this happened.
Does this have any relation to our privacy settings ?
bcoz sterday night i tweaked some of my privacy settings.
also i added a google adsense link unit to my blog header.
does that javascript interfering with this facebook widget ?
This problem is occupying my mind from morning and i can’t work till i get some solution.
sorry if i am disturbing you a lot.
thanks for your replies.
There is not much I can do right now, except waiting for Facebook to fix the issue. The button seems to be working intermittently on my site as well.
It should not have anything to do with your privacy settings, since it seems to be working fine for a while and later not working at all.
I am not sure about the privacy settings, but I am experiencing the same problem right now, so that would not be the issue.
oh, thanks for your patience buddy.
please ping me when facebook fix this issue buddy.
The like buttons seem to be working again. Let me know if you have any further issues.
Yes, buddy
I tried just now and they work fine.
And I forgot to say one thing.
Thanks for your great plugin.
I will write a article about u and ur plugin for sure.
thanks again.
Thank you! Be sure to send me the link when you’re done.
For Sure
http://www.axleration.com/how-to-guides/how-to-add-facebook-like-button-to-your-blog/
Thank you for your cool review!
How do you place the button with other plug-ins?
On my blog I have linkwithin, and I’d like to have the fb-like above that and not under as it kinda disappears. Tried editing single post, but either way it winds up under linkwithin. I also have tweetmeme, and if I ask it to show on the bottom, it gets placed over the linkwithin, where I want the fb-like to go.
How to I do this?
The only way to get full control over what goes where is to manually include the template tag in your single post template. There just enter the fb-like button before linkwithin (assuming that linkwithin actually has a template tag and that the automatic insertion can be disabled).
I can add a priority option to the next release of this plugin. That will make it possible to choose in what order the plugins should be included. Hopefully that will fix your issue, if you don’t want to edit the template, or if linkwithin does not have a template tag.
I don’t think it has one, I’ve tried editing but no luck. A priority option would be great!
Version 1.3.7 has just been released, with support for setting a custom priority. That should hopefully help you get the button where you want it.
Hi Johnny, I installed this on a really early version of wp, but since I couldn’t find the Settings Panel for this anywhere I thought that maybe it was because your plugin was developed for a later version, which turned out to be the case.
So I upgraded WP to the latest version, but still I can’t find the Settings Panel for this plugin anywhere.
I just checked in the database to see if your plugin stored any variables anywhere that I could try resetting, but couldn’t find anything.
Am I missing something?
Thank you
Hello! The settings panel is called “WP Facebook Like” and should be available if you click “Settings” in your admin menu. The URL for getting to the page is:
/wp-admin/options-general.php?page=wpfblike-options
but you should be able to see it in the menu. If not, I assume that you updated WordPress to 2.9.2, but do you know which version of PHP is running on your server? The plugin currently only supports PHP5 and newer.
Hey Johnny,
yes it’s definitely not in the menu, and I’m on PHP4 which is probably why.
Thanks very much
There seems to be some demand for PHP4 support, so I will add that to the list. (the best would be to upgrade to php5 though)
Ah well that would be great.
Totally agree, however it’s difficult to upgrade an entire server and all of its sites to php5
Thanks again.
Hi,
I am getting a “connect_to_node_error.php?” when it try to use
XFBML . “You must specify an URL as part of this widget or API.”
Any ideas how to Fix it ?, i got a Facebook App ID.
Thanks
Hello! I tried liking a post on your website (where you have your email), and it worked fine. Can you point me to a site/page where you have these problems?
It’s was set to iframe there it works fine.Check now i changed it XFBML.
Okay it’s working now with XFBML, there is an issue with the become a fan widget on the sidebar. I removed it and it’s works fine now.
Thanks for your help
Great!
It could be that your other widget is loading the Facebook SDK too. If you want both, you can try changing the option “Facebook SDK” to “disabled” in the options page under advanced settings for this plugin, and see if it works for you.
Hey man, love the plugin – a real time saver – one thing though,
I want to use the automatic inclusion on all single posts and pages, but there are one or two pages I don’t want it on – is there a line of code I can put into those pages to stop it being called?
Cheers,
Rich
Thanks!
There will be support for including/excluding posts and pages in an upcoming version of the plugin. Can’t say when exactly, but very soon.
Hi,
Thanks so much for this plugin!
I’d like to select the pages where I put the plugin too.
Is there a way to do that now?
Thanks again,
Kat
There is currently no way of doing this in the options. The next version will probably only feature an all-or-nothing for pages and posts, but after that, I will start working on a way to individually choose the pages to show the button on.
If you want to do this now, you can disable the automatic insertion of the button in the options, and use the [wpfblike] tag on the pages where you want the button to appear.
Stupid question: Does this plugin also publish the wp posts on a facebook fan page? And if yes, how? And how do i connect the wp post with the fb post?
Sorry, it currently does not do anything other than the like button. You will currently need to use another plugin like Wordbooker or similar to achieve this.
There are future plans for integrating other Facebook widgets and posting to this plugin, but that won’t happen for a while at least.
Works flawless,love it ]
Great that it works for you! It’s a cool website you have.
Hi.
Great widget. Love it.
But now I can only see how many of my friends that like what I just wrote. But I have no idea which friends.
How can I see that ?
Thank you!
You should be able to see the name of your friends who have liked the post right there by the button. You should also see their faces below the button if you haven’t disabled it in the settings.
If people who are not your friend on Facebook have clicked the button however, the number will increase, but you will not see who it is.
To try it out, have a friend of yours on Facebook click a like button and you should see it right away.
i like ur plugin the most
it looks awesome on the blog
and works very well also
Thank you!
Hi,
I’m afraid I got the connect_to_node_error.php too…
I tried switching from FBML to iFrame, disabling including SDK, enabling only on articles pages… same error
Last page I tried on : http://www.leblogdebebe.fr/2010/05/31/leffet-oooohhhhhhhhh/
Thanks for the job and for your help
I have seen this before. This seems to be more common with non-English blogs, where there are special characters in the header etc.
If you go to this URL, you see the raw button as created by Facebook. If you click it, you will get “The page at [url] could not be reached.”, which means that the Facebook servers can’t access your site for some reason. This is probably temporary though.
I saw this error too, I tried on 2 websites on my own and same msg occured.
Googled it and it seems that a lot of persons have the same issue.
Hope this will be corrected…
Thanks Johnny !
Hi! I love your plugin, but it isn’t working on my blog. Everytime I click “like” it comes up with a red error saying my site is not recognized by Facebook. Can you help me with this?
Hello! Thank you! Other people are experiencing the same issue at the moment, so the Facebook team should be working on it. It will hopefully start working again soon!
PHEW! So glad it’s not just me. Thanks for the quick response!!
Hi. Once installed, no settings for this plugin show up in my “settings” section. I’ve manually appended /wp-admin/options-general.php?page=wpfblike-options to my url, and I get a “You do not have sufficient permissions to access this page.”
Please advise. Thanks ^_^
Forgot to say, my server runs PHP 5.2.6
Hello. May I ask how you installed this plugin? Did you use the WordPress plugin installer or did you manually upload the plugin to the server? Did you make sure that it has the proper file permissions if you uploaded it yourself? Also, which version of WordPress are you running?
I used the WP plugin installer. And I’m running 2.9.2. Thanks!
It seems that you might have found a bug! I will submit an update shortly, which should hopefully fix the problem.
If you want to fix it by yourself in the meantime, open wp-facebook-like.php, go to line 54, and change admin_init to admin_menu.
Thanks!
Well i get the http://www.facebook.com/connect/connect_to_node_error.php for 2 days now.
However, when I click it I get the error “The page at XXXX(the url) could not be reached.”
example page
http://www.tvqc.com/2010/05/lauren-graham-photo/
Well ive disable fblike button and use your plugin instead, and the button just do not appear :s
There is a problem on the Facebook side right now, and the Facebook team should be working on a fix. See this thread for a discussion. Even big sites like Techcrunch are having these problems.
Bug Tracker
Great, I voted it up.
Great plugin…glad to see lots of updates since the first version! Does anyone have the comments/share features working properly!? I can’t seem to get it to come up using any plugin that I’ve tried. Will this work with PHP5 only or something? I tried setting to PHP5 but then sessions in my shopping cart will not save…UGH. Anyway, also when I am liking something, it generates link only to root url or a category in my shop…not to the page on which I clicked “Like”. Perhaps this is a conflict with wp ecommerce shopping cart plugin? Interested in making a FB Like version working with this shop!?
Thanks for all the hard work!
Thanks!
For the comment feature to work, you need to set up a Facebook application. When you have that set up, just enter the application ID into the settings page of the plugin and it should show the comment box automatically.
This plugin only works with PHP5 at the moment, but since several people have requested PHP4 compatibility, it has been added to the project backlog and will be implemented in a while. Note that PHP4 is insecure and terribly out of date, and you should preferably make your shopping cart work with PHP5 instead.
About the url problem, I tried liking one of your posts and it linked to the correct url. It didn’t work since Facebook are currently having problems with the Like API, but the URL was indeed correct. If you could show me a page where the button doesn’t link to the proper page, that would be great!
There are lots of cool features coming soon!
Facebook seems to have fixed the issue now, so it should hopefully work for all of you. If not, contact me.
They currently have a time-limit of 5 seconds for fetching your page, so if the site take more time than this to load, you will probably get an error. They might raise this to 7 or 8 seconds later according to a reply in the bugtracker.
How do i set the options? There is no coherent way showing up to do this. Also, the only face that shows up after “Like” is mine, and that only if I am logged in to Fb.
No comment field ever comes up and I don’t have an options screen to set it.
There in an options page if you go to your admin page, in Settings -> WP Facebook Like.
For the comment box to function, you will need to enter a Facebook application ID, and make sure that you are using the xfbml version (it’s the default).
You will only see the faces of your friends. Others will only show as an increase in the like counter.
some of my site work and some other don’t
There are still some issues on the Facebook side I’m afraid. Which error message are you getting?
Johnny,
Was looking for this solution, tried a few others, but WP Facebook Like works the most smoothly. Thank you for taking your time and effort to help all WordPress users by developing your plugin. I truly value the skills of those who can create plugins like yours.
I understand that there have been some API problems. Would this explain why your plugin outputs perfectly in Firefox but does not show up when viewed in IE? Not sure why this is happening otherwise.
Again, thank you for plugin.
Hello and thanks! Which version of IE are you having trouble with?
Johnny,
Using IE 8.
Weirder still, the plugin will not display on first page load. But if I navigate to another page on the site and then go back, it will display.
I’m stumped.
Weird. I’ll take a look on your site soon and try to figure out the problem.
Hello, the plugin works fine for me. But when i added a Link to Facebook no image were taken.
The reason is the html output:
Where can i set an default image ?
best regards
Tom
oh no html was taken
i mean the meta ….
property=”og:image” content=”"
The plugin currently doesn’t support the og:image property. I have added it to my list and it will be implemented soon.
Are there any other properties besides og:image that you want to control manually?
Is there a way to make the text (“5 people like this” and so on) appear below the button?
I have a narrow column I want to fit the plugin in, and the text gets in the way…
Other than that, thanks for the plugin.
Thanks! Not right now I’m afraid. The layout is currently decided by Facebook so the only thing you can do is to use the button count layout instead.
Hi Jonnhy – I do have your plugin, it was working perfectly and the stopped working. I saw that Facebook worked on the problem, it is now working but I lost all the counting of likes. From 23 in one post, went to 0!! any idea how fix this? Thanks!
Hello. As long as the URL to the post is the same, the count should remain. I can not affect the like count in anyway, since that is handled by Facebook. Are you having problem with multiple pages, or just one?
Hi
Is it possible to see who clicked the like button? Or does the script only show people who are my friends? I’m just curious how it works.
Best regards.
Hello! It is currently not possible, but I will look into that.
I would love the plugin to run with php4, as my provider still uses it. Keep up the good work!
Thanks! It’s on the agenda.
I absolutely love this plugin, however I just noticed that it’s not showing up in Internet Explorer. I use Firefox, so I hadn’t really thought about it. Troubleshooting something else on my site, and I noticed there’s no Like button in IE. Help?
Thanks! I will look into this as soon as I get back from my trip abroad. Which version of IE are you using?
In my IE 8 it doesn’t show up. However, when using IE Tab 2 in Firefox it shows up.
I was using xfbml – I switched to iframe and it’s working in IE now
Great! There seems to be a facebook issue regarding xfbml and IE. I will try to fix a workaround, but using iframe is probably currently the best option.
Hi!
I found a bug when using the plugin.
I used the iframe version with compact button.
The iframe doesn’t have a height valeu and it causes some problems with other divs. I put a value in the php plugin file and the problem was solved!
Thanks for the info! I should use a default height when using the iframe version. You can actually specify a height manually in the options page for the plugin.
All work perfectly but the comment box do not appear
The comment box will only appear if you specify a valid Facebook application id.
Is there an easy way to set the actual color of the text? I have it set to “light”, but I would actually like to specify a color.
Thanks!
Sorry, that is currently not possible using the Facebook API, but I will add the option it if/when they add support for it.
Great plugin!
Great plugin!
Just a quick question. I added the Like button manually using the XFBML version. It works fine in Firefox and IE. But in IE, when I close the browser, i get a runtime error. I looked at the error in a debugger and it’s something about Xdcomm and clearing cache. Have you ever seen this? You can try it on my website. Any ideas?
Thanks
B.
Hi Johnny,
Great plug in! I was how or if the plugin can import the “likes” I’ve received on my Facebook page into my blog. Currently it only shows up if someone comes to my blog and “likes” it.
Thanks!
Jesse
Hi,
Facebook takes first image of the page (<img src …), it is possible to exclude a particular picture? I have 3 pictures on the page before the post uprightly. : (