【问题标题】:Like button like Follow (Twitter) in Ruby on Rails像 Ruby on Rails 中的 Follow (Twitter) 这样的按钮
【发布时间】:2013-09-01 08:53:58
【问题描述】:
我添加了以下代码以获得一个不错的 twitter 关注按钮:
<a href="https://twitter.com/twitterid" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false" data-lang="en">Follow us @Twitter</a>
有没有办法为 facebook 获得一个类似的按钮?我尝试在facebook 配置它,但我得到了它的计数,这是我不想要的。
【问题讨论】:
标签:
ruby-on-rails
facebook
twitter
facebook-like
twitter-follow
【解决方案1】:
首先,您需要完整实现 Facebook 提供的代码。然后,您可以应用隐藏计数的 CSS 样式。试试这个解决方案,通过Jacob Quatier:
/* CSS Hack for hiding the LIKE count */
div.fb-like span {
display:block;
width:48px !important;
}
div.fb-like iframe {
width:48px !important;
}
div.fb-like iframe.fb_iframe_widget_lift {
width:450px !important;
}