Reputation: 129
I added face book like button on my site is there any way to disabled the count which is display next to the button.
http://www.knowledgenotebook.com/FB/notShow.png
Upvotes: 2
Views: 16249
Reputation: 57
All I had to do was change data-layout attribute from "box-count" to "button". Worked fine.
<div class="fb-share-button" data-href=@longURL data-layout="button">
Upvotes: 0
Reputation: 27331
If you want to include a share and like button (and don't need internationalization) this works:
<style>
.fb-wrap {height:20px; overflow:hidden;}
.fb-wrap div {position:relative; left: 27px; margin-left: -27px;}
</style>
<div class="fb-wrap">
<div class="fb-like"
data-width="160"
data-layout="button_count"
data-show-faces="false"
data-send="true">
</div>
</div>
Upvotes: 0
Reputation: 81
You can hide it using css styles, adjusting the width and hiding overflow, but be aware it's forbidden.
Facebook Policy IV. Application Integration Points
4 d. You must not obscure or cover elements of our social plugins, such as the Like button or Like box plugin
Upvotes: 0
Reputation: 11
For simple sites, just add a fixed width to the iframe
( width:47px !important;
)
For the multilingual sites where you have to display the Like/Recommend text in more than one language (EN: Recommend, DE: Empfehlen) the text length is different and you can't set a fixed width, but you can use layout=box_count
and set a fixed height:
height: 70px; margin-top:-41px;
Upvotes: 1
Reputation: 176
You can but not directly.
You have to set data-layout="box_count", wrap button code with extra element, set overflow and move button up. It will be something like that:
<style>
.fb-wrap {height:20px; overflow:hidden;}
.fb-wrap div {position:relative; top:-41px;}
</style>
<div class="fb-wrap"><div class="fb-like" data-href="http://mysite.com/" data-send="false" data-layout="box_count" data-show-faces="false"></div></div>
This will work more bulletproof than crop by width because of internationalization
Upvotes: 8
Reputation: 2226
Yeah, honestly I'm very disappointed that Facebook still didn't do anything to make the button configuration easier (show/hide count, change size, etc.). All the other mayor social buttons - Twitter, G+, LinkedIn, Pinterest have this option available, and there's no need to make CSS workarounds which not always work (mentioned above case of different languages).
Upvotes: 1
Reputation: 441
The default attributes you have available are here:
http://developers.facebook.com/docs/reference/plugins/like/
The code loads an iFrame on your site and you maybe able to adjust the size of the iFrame to hide certain components based on the design "Layout Style" you choose.
Upvotes: 0
Reputation: 3662
There are a few answers for the different cases where you can hide the count in the answers here:
Facebook Like-Button - hide count?
The side effect is that you have to hide the comment flyout as well.
Upvotes: 0
Reputation: 53
You can. All you need to do is set the width to 47 in facebook's iframe code.
Upvotes: 0
Reputation: 105916
You can't.
http://developers.facebook.com/docs/reference/plugins/like
The count is not a configurable attribute
Upvotes: 0