即使计数为 0,类似 FB 的按钮也会显示计数气泡

发布于 2024-12-26 11:47:59 字数 195 浏览 0 评论 0原文

我在“按钮”布局中使用 FB 类似按钮(立即计算类似按钮右侧的气泡,类似于 twitter)。当点赞数为零时,计数气泡不会显示,而且我在其他地方听说,只有至少有 3 个点赞时才会显示。我想知道是否有办法改变这一点,以便无论有多少个赞,计数气泡都会始终显示。由于所有其他社交按钮都会执行此操作,因此我不知道为什么会存在此异常。它使我的社交按钮栏看起来不一致。任何帮助将不胜感激。

I am using the FB like button in "button" layout (count bubble immediately to the right of the like button, similar to twitter). The count bubble does not show up when there are zero likes, and I have heard in other places that it won't show up until there are at least 3 likes. I am wondering if there is a way to change this so that the count bubble shows up all the time no matter how many likes there are. Since all of the other social buttons do this, I have no idea why this exception should exist. It makes my social button bar look inconsistent. Any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

岁月苍老的讽刺 2025-01-02 11:47:59

无法使用当前设置更改点赞按钮的这部分行为。您应该向 Facebook 提交您的请求,以便将其视为可能的增强功能。

There is no way to change that part of the behaviour of the like button with it's current settings. You should submit your request to Facebook to have it looked at as a possible enhancement.

昔日梦未散 2025-01-02 11:47:59

嗯,有一种方法可以做到这一点,但它不是很好。
您可以像这样包含原始 iframe,而不是使用 facebook 建议的代码:

<iframe scrolling="no" frameborder="0" allowtransparency="true" 
style="border:none; overflow:hidden; width:130px; height:25px; float:left; margin-right:10px;" 
src="http://www.facebook.com/plugins/like.php?href=YOUR_URL_GOES_HERE&layout=button_count&show_faces=false&width=130&action=like&colorscheme=light&height=21"></iframe>

我还发现,如果您将 &sdk=joey 部分添加到 src 属性(即facebook 的默认代码是做什么的)然后零计数器就会消失。所以看起来他们只是决定在迁移到新的 SDK 时删除此功能。

Well, there is a way to do it, but it's not very nice.
Instead of using the code suggested by facebook you can just include the raw iframe like this:

<iframe scrolling="no" frameborder="0" allowtransparency="true" 
style="border:none; overflow:hidden; width:130px; height:25px; float:left; margin-right:10px;" 
src="http://www.facebook.com/plugins/like.php?href=YOUR_URL_GOES_HERE&layout=button_count&show_faces=false&width=130&action=like&colorscheme=light&height=21"></iframe>

What I also discovered is that if you add the part &amp;sdk=joey to the src attribute (which is what facebook's default code does) then the zero counter disappears. So it seems they just decided to cut this feature when they moved to new SDK.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文