bharatesh
bharatesh

Reputation: 1022

Facebook like button is hiding like count

Implemented a Facebook like button feature on my site. Everything is working fine. If I use a locale parameter for the API. Then it hides the total count value. Example given below.

<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Freference%2Fplugins%2Flike&amp;width=450&amp;height=80&amp;colorscheme=light&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;send=true&amp;appId=218119584872965" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>

Above code block will show like button along with count but default language is English (Like).

Below code is same as above and here I used locale variable.

<iframe src="//www.facebook.com/plugins/like.php?locale=de_DE&amp;href=http%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Freference%2Fplugins%2Flike&amp;width=450&amp;height=80&amp;colorscheme=light&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;send=true&amp;appId=218119584872965" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>

Above code will show 'Gefällt mir' but hides like count.

Is there anything missing?

Upvotes: 1

Views: 828

Answers (1)

Josh Mein
Josh Mein

Reputation: 28645

In the iframe code, you have the option to set the height and width that you want the the like button to display as. You just need to increase the width accordingly to fit all the content.

For example, below I increased the width to 500px.

<iframe src="//www.facebook.com/plugins/like.php?locale=de_DE&amp;href=http%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Freference%2Fplugins%2Flike&amp;width=500&amp;height=80&amp;colorscheme=light&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;send=true&amp;appId=218119584872965" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe>

Or as in your case, the parent element may not be wide enough to display the whole thing so you may need to increase its width.

Upvotes: 2

Related Questions