开发者

Is there a way to remove like count in Facebook Like Box widget?

I kn开发者_StackOverflow中文版ow that tampering with their widget isn't allowed but how do sites like these hide their like counts and it doesn't seem like the widget has been edited. Is there a proper way to do this?

http://www.marketing-interactive.com/

http://www.humanresourcesonline.net/


<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2F%23%21%2Fpages%2FMarketing-Magazine%2F174907875860500&amp;width=314&amp;colorscheme=light&amp;show_faces=true&amp;stream=true&amp;header=true&amp;height=427" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:314px; height:427px;" allowtransparency="true"></iframe>

They're adding a height=427 parameter to the IFRAME URL, which results in the "faces" area at the bottom, and its accompanying fan count, being hidden from view. They're keeping show_faces=true because otherwise the Like count will be written next to the Like button.

There's a slightly weird double-line at the bottom as a result of this approach, but while earlier I wrote it was undocumented, the doc actually references the height param (it's just not in the plugin generator form), so it appears this is supported.


To make Like Boxes I still just goto Facebook's "generator" here: http://developers.facebook.com/docs/reference/plugins/like-box/.

When your putting in settings you uncheck "Show Faces".

This changes the resulting code they give you to: show_faces=false.


It's because they're using a Like Box, not a Like Button.

These are two different things, and the individual like buttons in a Like Box don't have the counts when "show faces" is enabled (though the counts are instead displayed elsewhere in the box).


Note: This answer is assuming you mean the Share Button, and not Like Box

They used a Facebook provided CSS to make the elements have a CSS property of display: none;.

On the span elements with the classes:

fb_share_count_nub_right
fb_share_count

Add the class fb_share_no_count on both of them.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜