Pankaj
Pankaj

Reputation: 10115

Show count with Facebook Like icon

In my web form, I have to show count of likes, just like it happens in Facebook. For that I am using below html code in a frame.

<iframe frameborder="0" scrolling="no" allowtransparency="true" 
style="border: none; overflow: hidden; width: 260px; height: 35px;"            
 src="http://www.facebook.com/plugins/like.php?app_id=139756762768973&amp;
 href&amp;send=false&amp;layout=button_count&amp;width=100&amp; 
 show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&        
 amp;height=35"></iframe>

When the page gets rendered, it shows you a Like icon, on clicking the icon it will open the facebook pop up to input your credentials. Now i want to show the count of likes parallel to the like icon.

Any help will be really very appreciated...

Upvotes: 0

Views: 1046

Answers (2)

Pankaj
Pankaj

Reputation: 10115

I was using wrong URL in the IFrame

Upvotes: 0

Nitzan Tomer
Nitzan Tomer

Reputation: 164357

This is not a good way to use this plugin, and because of that you have no control over how the button is rendered.

You should use the code you get here: http://developers.facebook.com/docs/reference/plugins/like/, it uses the facebook javascript sdk, and in that page you can play with the different options to get the most suitable design for the button (from what fb let you play with).

You might also want to check another like widget: http://developers.facebook.com/docs/reference/plugins/like-box/

Upvotes: 2

Related Questions