Facebook has just unleashed the Like buttons for the whole web. They are the same Like buttons which you used to see on Facebook, which will now be seen on various websites very soon.
If you are a webmaster, you might be interested in implementing this on your blog/website right away, since it lets users to share something they find interesting on your website on click of a button.
How to Add Facebook Like Button on WordPress Blogs?
Implementing Facebook’s Like button on your WordPress blog is fairly straight-forward. Just visit the Facebook developer page where you can customize the Like button as per your need and get the code. For the URL, key in php_the_permalink as shown below.
Update: If you get an error, use php echo urlencode(get_permalink($post->ID)); in place of php_the_permalink
In case you are on Blogger or any other platform, just replace the php_the_permalink part with the permalink code of your system.


Raju PP is the founder-editor of Technically Personal, which is one of the most widely read technology blogs on the web. He holds an Engineering degree in Electronics & Communication, and has previously worked as a Technical Specialist in Banking Software domain.
I like the idea behind like button..but does it mean they pulling plug for Fb share button?
So… once someone “likes” something on my site, what happens? Does it show up on Facebook on their wall?
What about if you do not have a blog (or other website in php). I have thousands of static html pages on my site and I can’t seem to find a way of getting the current page url to be ‘liked’ without coding each page individually.
@Rob..convert your site to a CMS.
Doesn’t seem to be working. I get an error that reads
The page at http://<php%20the_permalink();?> could not be reached.
@Harsh,
Most probably yes, it is yet not clear though.
@Cassidy James,
Yes, it will be something like this – “Raju likes How to Add Facebook Like Button to Your Website? on techpp.com.”
@Rob,
I am sure there will be an alternate code to find the permalink in any non-wordpress, non-php based websites. If you tell me what platform you are using, I will to help you out
@Anand,
It worked for me, as you can see below the post. Anyway, I have updated the post with an alternative method, do try that.
my site is based on wordpress and i keep getting the same erros as @Anand…none of the work around suggested here seem to work, thoughts?
I am guessing that the problem is with the placement of tags. Look for the_content() and place the tags either before or after the_content()
Same outcome …. I get an error trying all methods described in this post. The error says “The page at ACTIVEPOSTPAGE can’t be reached.” The ACTIVEPOSTPAGE correctly identifies the post where the Like was initiated.
Bummer. I’ve tried all of the plugins cooked so far … same outcome on all.
Try this plugin, it will solve your problem (it works with older Worpress installs as well as new ones):
Facebook Like WordPress Plugin
Feedbacks appreciated on this blog post while waiting for WordPress to approve it and move it to the directory.
(the blog actually uses it so you can test the plugin live before installing)
A Facebook OpenGraph WordPress plugin hear ((with the new Facebook like, activity and recommendations widgets. And the old Facebook Connect login and register, send comments….):
http://www.sociable.es/facebook-connect/
Tutoral with screenshots:
http://www.sociable.es/facebook-opengraph-wordpress-plugin-configuration/
its god update..
# Anand Srinivasan Says:
April 22nd, 2010 at 10:45 am
Doesn’t seem to be working. I get an error that reads
The page at http://<php%20the_permalink();?> could not be reached.
_________________________________________________________________________
Use Mozilla Firefox instead of Microsoft Explorer then you get a nice window with the code.
/Palle
I just tried that wordpress plugin out and it worked great thanks! Check it out
The plugin is now on WordPress:
http://wordpress.org/extend/plugins/like
Did anyone figure out the solution to the “The page at {url} could not be reached” error?
Several people on this thread were getting this error and I haven’t been able to find a work-around.
Thanks Raju it works like a charm, and I like your idea
we’re trying to implement this on our website, but for some reason when we go to the app page on facebook, it’s not recording any ‘likes’ in the back end data (i.e a blog post might have 10 likes, but it’s showing as 0 overall on the dev application). i have a feeling we’re missing something really obvious. can anyone shed some light on this?!
Same issue as Sarah. Have liked a couple of pages but not showing on either News feed or profile. No errors are shown and an incremental like score appears on the liked page button.
try this.it works fine.i have add into one of my my blog site.very usefull.
Thanks… i did it on my blog.