Fix: Facebook Like Button Not Working
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:
- Go to the Facebook URL Linter Tool on the Facebook Developer website
- In the “Input URL” field, enter the URL of your page or post where the Facebook Like button isn’t working
- 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!
34 Comments + Add Comment
Leave a comment
Welcome to All Webmaster!
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...]