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

大城市里の小女人 提交于 2019-12-22 01:50:50

问题


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 friends to like this' part?


回答1:


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




回答2:


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.




回答3:


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!




回答4:


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.




回答5:


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.




回答6:


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.




回答7:


If you use components K2. You fix in Items K2

Head name "Social Sharing"



来源:https://stackoverflow.com/questions/3193749/how-to-remove-the-be-the-first-of-your-friends-to-like-this-part-of-the-standa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!