0

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...

2
  • Your question might get a better response at webmasters.stackexchange.com. This isn't really a programming question. Feb 15, 2012 at 19:25
  • ok. I need to just show the count on my page using it. If you are talking about the basic understanding of how to accomplish it and in order to do that I should move it there then Please migrate it...Thanks
    – Pankaj
    Feb 15, 2012 at 19:27

2 Answers 2

2

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/

10
  • can you help me out to show just the count along with Like button please ?
    – Pankaj
    Feb 15, 2012 at 19:32
  • those are not articles but the official documentation, I suggest that you get familiar with that. Also, if this answers your question, please mark it as the right answer. Feb 15, 2012 at 19:34
  • Really? this is hardly a question for this place. It's very straight forward how to use the form in that page, all you have to do is uncheck some boxes (like the "Send Button" and "Show Faces") and you see the result, right there. Feb 15, 2012 at 19:35
  • I tried with the below code and it is enabling the like button on clicking it and on the other hand in link it is not behaving in this way...
    – Pankaj
    Feb 15, 2012 at 19:56
  • 1
    no, i said do not use the iframe option, it even says so in the facebook place to get the code, i quoted that for in my last response. use one of the other methods (html5 or xhtml) Feb 15, 2012 at 22:01
0

I was using wrong URL in the IFrame

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.