Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I test the Facebook "Like" button on localhost?

It is possible to test "Like" button on localhost?

like image 973
Tomasz Gutkowski Avatar asked Sep 29 '11 10:09

Tomasz Gutkowski


People also ask

How does the Facebook like button work?

When a user clicks the like button, the content appears in the News Feeds of that user's friends. The button also displays the number of users who liked each piece of content, and may show a full or partial list of those users.


2 Answers

Not really; facebook has to crawl your site to pull in the title, description, and thumbnail. It can't get to your site if it's on localhost.

like image 154
Dave Avatar answered Sep 28 '22 14:09

Dave


Dave's answer is correct, however, I just discovered a workaround: You can make your local machine accessible by using http://localtunnel.me . You'll need to (temporarily) change some URLs used in your app code / html so links point to the temporary domain, but at least facebook can reach your machine.

like image 36
Martin T. Avatar answered Sep 28 '22 12:09

Martin T.