How to remove the “Be the first of your friends to

2019-04-18 17:19发布

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?

7条回答
啃猪蹄的小仙女
2楼-- · 2019-04-18 17:45

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.

查看更多
Ridiculous、
3楼-- · 2019-04-18 17:46

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.

查看更多
Summer. ? 凉城
4楼-- · 2019-04-18 17:57

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

查看更多
贪生不怕死
5楼-- · 2019-04-18 17:57

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!

查看更多
Bombasti
6楼-- · 2019-04-18 18:01

If you use components K2. You fix in Items K2

Head name "Social Sharing"

查看更多
祖国的老花朵
7楼-- · 2019-04-18 18:02

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.

查看更多
登录 后发表回答