Jul
15
2011

Fix: Facebook Like Button Not Working

Facebook Like Button

The Facebook Like button, which recently replaced the Facebook Share button, is a great way to encourage your visitors to share content or posts they like on your website or blog with their friends. When a visitor “likes” something on your site, a link to the page they like is automatically posted to their Facebook stream for all their friends to see. This is an easy way to increase traffic to your site, and many webmasters have added Facebook Like buttons to their site. Recently, I’ve run into an problem on several of my websites with the Facebook Like button not working. The Like button would stop working out of the blue (meaning I didn’t change any of the code), and anytime I clicked on the like button it would like the post for a second, then it would immediately “unlike” itself. This issue was driving me crazy, but I finally stumbled upon an easy solution to fix this problem of the Facebook Like button not working.

My Facebook Like Button Doesn’t Work!

The first thing to do if your Facebook Like button stops working is to troubleshoot it and rule out possible causes. I started with the most likely cause, the code on my site. My Like button had been working before, and I didn’t purposefully make any changes to the code. But just to be safe I looked at the code on my site. It looked valid, and I confirmed this by checking the Facebook Developer site. No problems with the code stood out. I even copied the code for the Like button right from the Facebook Developer page and tried using that instead of my current code, but my Facebook like button was still not working.

Facebook Like Button Working Again?

The next troubleshooting step I took was to use the Facebook URL Linter tool. The URL Linter was created by Facebook as one of their developer tools as a way to debug problems with the Like button and other Facebook social sharing widgets. If your Facebook Like button doesn’t work, and you’ve already checked your own code, this is a great tool to provide you additional details to help figure out the problem. I didn’t find anything out of the ordinary when I ran my post URL through the Linter tool, however, after running it my Facebook Like button started working again on that URL! I checked another post where the Facebook Like button problem wasn’t working, and it was still broken. So, I ran the Linter tool on it and the Like button was fixed on that post too. Finally, a solution!

How to Fix the Facebook Like Button on Your Website

If your Facebook like button is not working, or you’re having problems with your Like button “unliking” itself when you click it, here are some easy steps to fix the problem:

  1. Go to the Facebook URL Linter Tool on the Facebook Developer website
  2. In the “Input URL” field, enter the URL of your page or post where the Facebook Like button isn’t working
  3. Click the “Lint” button

That’s it! Now, go check the Like button at the URL you linted and it should be working again. While this Facebook Like button fix is quick and easy, the downside is you’ll need to run it on each post or page where your Like button is broken. This is only a problem if you have an large site and the Facebook Like button is having problems on many of your posts (in some cases it’s only broken on a few posts / pages).

If for some reason the URL Linter fix I detailed above doesn’t fix your Facebook Like button, it should still provide you with extra details and any error messages that should help you fix it.

What Caused Your Facebook Like Button to Break?

Honestly, I’m still not 100% sure what the root cause of this issue is. It appears to be caused by something on Facebook’s servers. My best guess is the URL Linter fix I stumbled on is able to fix the broken Like buttons because when you run it on a URL it retrieves information on how that particular URL will be shared on Facebook (title, description, which thumbnail image, etc) when someone shares or likes it. When it fetches this data, it also updates the cache of that data on Facebook’s servers. This could be the reason why the URL Linter is able to fix broken Like buttons.

One additional thing I noticed is this issue appears more common on URLs that have been shared before using the old Facebook Share button. Once I run the URL Linter on a URL that used to have a Share button, the Like button not only starts working, but it shows the correct number of shares in the like count box.

If you have any other ideas on what might be causing this issue with Facebook Like buttons, or want to share your experience with a broken Like button, please let me know in the comments below. I’ll keep updating this post with any new details we uncover together, so your comments will be very helpful and much appreciated!

Lastly, if this fix works for you, or if you found this post useful, please “like” it using the buttons at the top or bottom of the article, or “like” All Webmaster.com’s Facebook Fan Page using the widget on the right menu or the like box below… Thanks!

Related Posts

About the Author: Dana Duncan

Hi, my name is Dana, and I've been building websites for over 12 years. It's a topic I'm passionate about and enjoy teaching. Here at All Webmaster.com I teach people how to create and run websites, and show businesses how to build or improve their web presence.

34 Comments + Add Comment

  • This fixed my broken like buttons!! Thank you so much for the detailed post!

  • I’m having trouble with my like button, once the like button is clicked it doesnt update on my friends facebook page. anyone have an idea why??

    • Hi Tony, is the “like” count increasing when your friend clicks on it? You also may want to ask them to check their Facebook settings to make sure they didn’t turn off pages they like from being displayed on their wall.

      • Good Afternoon Dana,

        Yes the “like” count increases but it doesnt update on my facebook page.

        I hit the “like” button on this page with one of my facebook accounts. i logged into my 2nd account and i cant see the update from the previous one saying i like the page.

        I tried it with a different website and it works fine it updates to all my friends.

        But in my website and in yours it doesnt do that.

        • Tony, there are two different forms of the like button: you can “like” a facebook fan page or you can “like” a specific URL. For example, on this article I have a like button at the top of the page next to the twitter button. When you click this you’re liking the URL of the article I wrote and the link to it should be posted on your facebook news feed (assuming your privacy settings are set this way). At the same time, I also have a fan page for All Webmaster.com. The box to like our Facebook page is on the right menu where it says “Like Us On Facebook”. When you click this version of the like button, you’re becoming a fan of our Facebook page. So two versions of the like button, and two different results on Facebook when you click them. You’ll want to check your privacy settings for both of these different like buttons and see if they’re set to post on your wall. Hope that helps…

  • It worked for me too. Like buttons are working as they should be now

  • Like button is working for the homepage, even counts are perfect too
    But for our About Us Page (fd.fd2009.dev.fdwork.com/include/information/aboutus.aspx)
    Like button is working, but it does not shows the correct number of like count
    both have same og:type but still facing the problem,
    Url Linter shows the same specification for home page as well as AboutUs page.
    Please help me out

    • Hey Nivedita,

      Both your like buttons (home and about page) are working for me. The URLs have “dev” in the subdomain, are they in a development environment? The reason I ask is because like counts are tied to specific URLs. That means even if the about page was exactly the same, but the URLs were different (e.g. “www.yourdomain.com/about.html” and “dev.yourdomain.com/about.html”), each page would have its own separate like count. The good news is your like button code seems to be correct since the count is working (and it posted the link to my facebook wall).

  • Hi Dana,
    We’ve just installed a Facebook Like button (one at the top menu which links to the home page, and one in our share box which links to that particular page). When I had a friend test it on the homepage, the counter jumped up and then down. We’ve just done the URL linter test. The question is – do we have to do this for every URL that has the same LIke Button?

    Interestingly enough we are having a similar issue with the twitter counter not registering and Google Plus as well. We have some javascript code that disable the ability to copy text from our pages – maybe this is interfering?

    Thanks,

    • Hi,

      If you’re experiencing the same Facebook like button error I and many others were seeing you’ll need to use the URL Linter on all the URLs where your like button isn’t working. This is assuming the linter tool fixed the like button on the pages you used it on. You shouldn’t have to run it on any new pages you create though, just the existing pages where its not working. The issue I’ve run into isn’t related to my Twitter count button or Google+ button, so if you’re having trouble with all three your may be facing a different issue. Disabling javascript could certainly be the cause since all these buttons use it. Try getting rid of the code to disable javascript and see if that fixes your social buttons before you go through and lint every URL. Hope this helps!

  • Your post saved my product launch and potentially large negative fallout that would’ve happened if I hadn’t found this page 10 minutes before the deadline. Thanks!

    • Wow, I’m REALLY glad to hear this fix helped you out so much! Thanks for leaving the comment and letting me know, I love to hear about these kind of things. Good luck with your product launch!

  • Hi,
    Regarding the like button. I’m running a classified ads site and basically
    when somebody post some ads. I’m also posting their ads in facebook
    by copying the link then posting it in facebook.

    Problem is the like count is increasing. Example I press “like” button then
    I share it 3 times on facebook friends wall. Like count is now 4, 1 for the actual like
    and 3 just for sharing.

    • Hi,

      Thanks for stopping by All Webmaster! From what you described it sounds like your like count is working correctly. A little while back when Facebook made the big switch from the share button to the like button they rolled some of the functionality together. Now, when someone shares a link on their wall it has the same affect as clicking the like button directly on your article. In other words, by sharing your article on your friend’s wall, Facebook sees this as them liking it. As a result, your like count goes up.

      Another interesting behavior of the like button is if you share a post on your wall and your friends comment on your post, that will also increase your like count. Basically, it counts the number of interactions on Facebook more so than the number of people who actually click on the like button!

  • Unfortunately no luck using this method on our page at: http://geekdrop.com/content/facebook-list-of-fun-tag-statuses-to-add-to-yours

    • Hi, looks like the issue you’re running into is different than the cache issue the LINT tool fixes… I tried running the LINTER and the button still isn’t working. However, the error I’m seeing is different than the normal broken button. In the most common issue with Facebook like buttons (that the fix above works for) the button changes to liked for a split second then goes back to being unliked. When I click your like button I’m getting an error message saying “This page is either disabled or not visible to the current user.” I did a bit of research and this appears to be a known bug that Facebook is currently looking into (see specific bug report here -> http://bugs.developers.facebook.net/show_bug.cgi?id=19916).

      I’ll ask around some more and see if I hear of any other fixes. Unfortunately, you may need to wait for Facebook to release a fix for this bug. Please, feel free to post any additional info you have (is your like button working on other pages, is access to the page limited at all, etc) in the comments here and hopefully I, or one of my readers, might come across a solution for you.

  • FYI, mine was not working because I was trying to use a span instead of the provided div so :

    <div> works, <span> doesn’t

    That’s good to check too

    • Hey Raph,

      Good to know! I hadn’t heard of that being a problem, but now that you pointed it out its another place people can troubleshoot if their Facebook like button stops working. Thanks for the info!

  • Hi Dana!

    I’ve been killing myself with this freaking Like button on my blog, that used to work, then worked with a delay, now doesn’t seems to work, and found your site in the process. So if you don’t mind, I’ll rant/beg for help here as well :)

    I’m using Simple Facebook Like plugin. I’ve been using this plugin for a while now and it worked great.
    But for about a month or so, I appear as logged out of FB on my blog. Next to the “Like” button I get a text: “Sign Up to see what your friends like.”
    I am permanently logged into FB and even if I click on the “Sign Up” link on my blog, it just reloads the page and that’s it. But I don’t even mind that, the main problem is that I also can’t Like any of my posts, it just reloads the page and no action is taken (no link on FB, no Like count, nothing).
    I also don’t see any Likes on my posts. It looks as no one has liked a post. It used to work if I myself liked my post. When I’d click the Like button, 10+ likes would appear. That was before, when I was able to Like the freaking thing, now I can’t even do that anymore.
    Strangely, I can Like a post through my mobile.. I appear logged in and I can also Like a post. I did just that right now for my last 2 posts and even if I unlike them right after, the Like count stayed and 1 and at 2 for the second post.

    I use my blog, have a FB page and a FB profile. I write a post on my blog, then post the link on my FB page and share that on my FB profile. In the past, all these shares would be counted as Likes and would show up next to the Like button on the blog. Same with the actual Likes. If 3 people would like the link on my FB page and 4 people on my FB profile, I’d get 7 more likes. But now it seems that doesn’t work anymore. I usually get very low Like clicks on the blog, much more on my FB page and profile, so this is a bummer for me :/

    Worst of all is, I have no idea how other/random people see my posts. Can they like them, can they share them, can they see the like count, etc.. ?? :(

    I also use (FB related) plugins:
    Facebook Like Thumbnail by Ashfame,
    Facebook Recommend Button by Ashan Rana,
    Facebook Share Statistics by Carmen Olivo
    and
    WP Facebook Open Graph protocol by Chuck Reynolds

    What’s wrong? Is it my side or is it FB? Any ideas? :/

    TIA,
    Mat

    • Hi Mat, thanks for stopping by AllWebmaster.com! Sorry to hear you’re having all those issues with your like button. After reading your post and taking a look at your site, my best guess is that the problem could be that some of the Facebook plugins you are using might not work well together. For instance, I generally go with just the Facebook Like button and not the Facebook Recommend button (which is actually an older, outdated button). I’ve seen examples where webmasters have had trouble using these two buttons together. And the problem with WordPress plugins is you don’t always know exactly how they are doing what they do unless you dive into the code. I’m not familiar with the specific plugins you’re using, but its possible one or more are not calling the most up-to-date Facebook APIs, or that each plugin is making its own call and Facebook isn’t handling it well.

      The best way to troubleshoot this is to try disabling all the plugins. Then, try manually adding a Facebook Like button to your site (you can get the code here -> https://developers.facebook.com/docs/reference/plugins/like/). If you want multiple Facebook buttons, select the option to use the “Send” button as well as the Like button (this works similarly to the old Recommend button you still have on your site). If the button works you’ll know the problem was with one of your plugins. From here you can either leave things as they are or try re-activating your plugins one at a time. If you activate a plugin and the button stops working, you’ll know which one was causing the problem.

      I hope this helps, good luck with your site!

      • Hi Dana!

        Thx for your reply!
        The thing that’s bothering me the most is, all this worked great a month ago :/

        I’ve tried disabling everything, then turning it on one at a time. No change, I always show as logged out. I also tried with different like plugins, same thing.

        I’ve now streamlined the plugins, so all I have is:
        WP Facebook Like by Johnny Chadda
        WP Facebook Open Graph protocol by Chuck Reynolds
        and
        Facebook Like Thumbnail by Ashfame

        (should I delete all other FB plugins or is Disable enough?)

        I’m not bothered that much with this “Signed out” thing (even if I can’t use the Send button since the popup closes half a second after it pops up), the main problem is, I can’t get all the shares/likes to be counted together.

        For instance, my previous post: http://blog.matickos.com/2012/01/sedmica/
        has 2 likes on the blog (as it seems, no way of telling for sure), was shared at least twice (by me), has 3 likes on my FB Page and 6 likes on my FB Profile (+3 comments)… but the button on the blog post still shows only 2 likes.. In the old days, it would show at least 13 likes.. :/
        And that’s the main thing I’d like to fix.

        I’ve also created an app and used AppID, but no change.

        I’ve started with that manual code thing and noticed that in the code preview window, I was shown as Signed IN, not signed out as I appear on my blog. I was also able to click the Send button and got a thumbnail image and a comment window, which I’m not able to do on my blog. But the post count was still only 2.. So I’m guessing there must be something on my blog that’s blocking me, but have no idea why the count doesn’t work.. :/

        That’s it from me.. for now.. :)

        Thanks a lot!
        Mat

      • UPDATE to my previous post up there:

        I’ve figured out that the “Sign out” problem is related to my Firefox on my main machine.
        When I use Chrome, I can sign in through my blog and am then able to click the Like and the Send button (which get cut off a bit on the bottom as I just discovered. Yet another problem to fix). When I use Chrome on my notebook it’s working as well.
        So there must be something wrong with my FF. I have the latest version, I’ve just deleted all the cookies and tried it again, but no luck, it doesn’t work.
        But like said, I’m not that bothered with that, main thing is to get all the shares/likes counted on the blog.. :)

        TIA,
        Mat

  • Hallo Dana i have problem with Like Button oin my website.

    I have install plugin for like button on all my post. When some one click on like button counter is work ok, but post (link) dont share on FB profiles and News Feed. At classic profiles link go to wall but not on news feed, in timeline profiles link (post) not share on timeline and news feed. I have some problem with comment plugin. Pls help me, Thanks a lot.

    • Hi Thunagon, I just responded to your other comment. Hope it helps!

  • The like button on the left and the like button after the post – on my web site arent working properly (zabavax.com) when you click the like button the countdown of the likes works fine but the post(link) does not share ti on facebook users on their timeline i.e the post they have liked on the web site does not appear on the timeline layout, nor does it appear on the news feed of the user’s friends. I noticed that the likes of the facebook users who have timeline(layout) are shown only at the activity log. As for the classic facebook layout users, their likes (of the posts on my web site)appear on their wall but the like is not shared (shown) on the user’s friend’s wall via news feed feature. I have also included comment plugin for facebook and it works fine (shares on facebook as it should)
    Please help me with the above mentioned problem.
    Thankful in advance

    • Hi ZbavaX,

      That’s an interesting observation of the Facebook like functionality. I looked at your site and it the like button was working for me. That seems to indicate that the code on your site is correct. Perhaps its a bug with how likes are handled internally by Facebook? The whole timeline feature is so new that bugs are likely. You may want to report this behavior to the Facebook support team and they can take a look at it. Good luck!

      • Thanks a lot, i’ll send this problem to bug track on facebook. Thanks again.

        • I was having the same problem. I switched from the iframe code to the html5 code and it seems to have fixed it. Weirdly, when I did that and then liked a page that I liked before, all the old likes then showed up on my timeline. Must be a bug with Facebook. Until they fix it, this should solve the problem though. Get the code here: http://developers.facebook.com/docs/reference/plugins/like/

          • Thanks for the tip Jeremy! I’m sure it will come in helpful to other readers here.

  • Actually, I need to amend what I said above. With the iframe code, I was not seeing any trace of the “like” – on my timeline or in friends’ news feeds. Once I switched to the html5, it was showing up in my activity log, bug not on my timeline and not in friends’ news feeds. However, with the html5 code, a box pops open when you click like giving you the option to comment on it. If I comment on it, then it shows up both in my timeline and in friends’ feeds. So maybe it’s a bug, or maybe Facebook doesn’t think it’s worth showing people’s webpage likes unless they have something to say about it. Would be a shame if it’s the latter.

  • I saw the exact same behaviour, which in my case wasn’t fixed by running the linter tool.

    The url that was being liked is of the type ‘website’, which normally results in anyone clicking the liked ‘object’ on facebook to go to our url. So, I decided to ‘unpublish’ the associated facebook-page (which was rather ugly, and which you would normally not be able to visit anyway).

    Well, you guessed it: that was what resulted in my broken like button. Republishing this facebook-page fixed the button immediately.

    • Thanks for the additional info Jelmer! Glad you were able to figure everything out. It should be helpful to other members looking for a fix if the linter tool doesn’t work.

  • I want to hug you!! After monkeying around with my social buttons and ‘breaking’ my site, I have spent 3 days trying to figure out why my like buttons disappeared and only some of the posts. This has brought them back on almost all of the ones that I applied the fix to.

    I do have one thing I can’t figure out. At my site influenceology, you will notice that some of them are not fixed? It appears it’s the ones that have a video (using EVP plugin). Any ideas why they aren’t working?

    Thanks for this post!!
    Jeff

  • Thanks alot (= . i spent my all day finding the solution. This was really helpful. thank you once again.

Leave a comment

Welcome to All Webmaster!

Dana Duncan About Picture

Hi, my name is Dana and here at All Webmaster I teach people how to build websites. I've been creating websites professionally for over 12 years and this is where I'll share the things I've learned so you can build your own website and get people to visit it. [More about...]

Like Us on Facebook: