开发者

How to remove the "Be the first of your friends to like this" part of the standard iframe Facebook Like button?

I'm using the standard Facebook Like button (iframe, not fbml). Is there a way to only display the like button, not the 'Be the first of your frien开发者_StackOverflowds to like this' part?


This is currently not configurable. If you use the button_count layout, then you won't see that text.


As of today's date, in the Like Box code, instead of layout=standard use layout=button_count and that will show the count bubble & remove that text.


You can simply do this using CSS. Place the like button inside a div. Give the div containing the like button some width. Then set overflow to hidden. Should work!


If you want to just have "x people like this" then:

.fb-like { overflow: hidden; width: 171px; }

If you want to have just the number of people that like it in a box then with the Like Button Generator select button_count from the Layout Style drop down.


IMO the easiest way is to resize the generated iframe with CSS to 54px width (small button). Unfortunately, the iframe doesn't has a class or ID, but you can match it by src attribute:

iframe[src*="://www.facebook.com/plugins/like.php?"]

Of course matching it with a descendant selector is easier.


Checking the code of this WordPress plugin should help you:

http://wordpress.org/extend/plugins/facebook-fan-box-cache/

It caches facebook fanbox and then outputs it without iframe. In that way you can remove any part of the box you like.


If you use components K2. You fix in Items K2

Head name "Social Sharing"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜