facebook-like-buttons

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.

facebook-like-button

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.

Subscribe via RSS or Email:
Raju is the founder-editor of Technically Personal. A proud geek and an Internet freak, who is also a social networking enthusiast. You can follow him on Facebook and on Twitter. Mail Raju PP.

23 Responses so far | Have Your Say!

  1. I like the idea behind like button..but does it mean they pulling plug for Fb share button?

  2. So… once someone “likes” something on my site, what happens? Does it show up on Facebook on their wall?

  3. 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.

  4. Doesn’t seem to be working. I get an error that reads

    The page at http://<php%20the_permalink();?> could not be reached.

  5. @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.

  6. 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()

  7. 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.

  8. 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)

  9. 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/

  10. its god update..

  11. # 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

  12. I just tried that wordpress plugin out and it worked great thanks! Check it out

  13. 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.

  14. Thanks Raju it works like a charm, and I like your idea

  15. 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?!

  16. 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.

  17. try this.it works fine.i have add into one of my my blog site.very usefull.

  18. Thanks… i did it on my blog.

Trackbacks/Pingbacks

Leave a Reply

Custom Search
Copyright 2012 Technically Personal!