有没有办法删除 Facebook Like Box 小部件中的点赞计数?
我知道篡改他们的小部件是不允许的,但是像这样的网站如何隐藏他们的点赞计数,而且小部件似乎没有被编辑过。有没有正确的方法来做到这一点?
I know 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
他们在 IFRAME URL 中添加了一个
height=427
参数,这会导致底部的“面孔”区域及其附带的粉丝数量被隐藏起来。他们保留show_faces=true
,因为否则“赞”计数将写在“赞”按钮旁边。由于这种方法,底部有一个稍微奇怪的双线,但虽然我之前写过它没有记录,文档 实际上引用了高度参数(它只是不在插件生成器表单中),因此看来这是受支持的。
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 keepingshow_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.
为了制作 Like Boxes,我仍然只需转到 Facebook 的“生成器”:http:// Developers.facebook.com/docs/reference/plugins/like-box/。
当您进行设置时,您取消选中“显示面孔”。
这会将他们提供给您的结果代码更改为:
show_faces=false
。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
.这是因为他们使用的是 Like Box,而不是 点赞按钮。
这是两个不同的事情,当启用“显示面孔”时,点赞框中的各个点赞按钮没有计数(尽管计数显示在框中的其他位置)。
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).
注意:此答案假设您指的是“分享按钮”,而不是“Like Box”
他们使用 Facebook 提供的 CSS 来使元素具有
display: none;
的 CSS 属性。在带有类的
span
元素上:在它们两个上添加类
fb_share_no_count
。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:Add the class
fb_share_no_count
on both of them.