0

添加以下代碼以獲取Twitter的一個很好的後續按鈕:像關注(微博)在Ruby on Rails的Like按鈕

<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

首先,您需要實現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; 
}