Facebook like button not working!

I had few troubles implementing facebook like button in my website. Infact i got the code  from facebook in html5 and the like button never showed up.

My website was built using smarty and i had to use { literal } to wrap all javascript tags. Only then it worked. Even after it showed up, it disabled the tweet count and google +1  buttons making them unclickable.

Keep in mind that when you implement facebook like in your website, make sure you add data_href value

<div data-href="http://example.com" data-send="true"
data-layout="button_count" data-width="200" data-show-faces="false"></div>

and sometimes facebook like do really need the Javascript SDK for it to work. To include the source file, just add this line.

 <script src="http://connect.facebook.net/en_US/all.js"></script>

Thats it! The like button should work without any problems. Make sure you dont miss div or any html tags.

Similar Posts:

Prabhu Balakrishnan

I am an entrepreneur and graduate in Computer science engineering, pretty cool chap, blogging since 2005. My interests are Machine learning, Parallel computing, Computer vision, PHP, Wordpress, Linux etc. I like to chill out with travels, video games and a cup of hot coffee. I am born in India, currently living in Budapest, Hungary. Feel free to contact me anytime!

Leave a Reply

Your email address will not be published. Required fields are marked *