像Ruby on Rails中的Follow(Twitter)之类的按钮

时间:2013-08-29 04:19:27

标签: ruby-on-rails facebook twitter facebook-like twitter-follow

我添加了以下代码,为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配置它,但我得到了它的计数,我不想要。

1 个答案:

答案 0 :(得分: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;
}