如何让facebook分享按钮的计数器一直显示?

时间:2010-01-15 17:17:43

标签: javascript html facebook twitter

我的博客页面中有一个Twitter分享按钮和一个Facebook分享按钮。 Twitter计数器总是显示,但是facebook只会在你发布内容时显示,然后在页面刷新时消失,并且在发布内容之前不再显示。我希望它始终显示出坚持设计的凝聚力。

           <div id="share_stuff">
                <div class="share_buttons">
                    <a name="fb_share" type="box_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
                </div>
                <div class="share_buttons">
                    <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
                </div>
            </div>

5 个答案:

答案 0 :(得分:1)

在计数器出现之前,页面需要至少共享3次。

可在此处找到更多信息:

http://wiki.developers.facebook.com/index.php/Talk:Facebook_Share#Counter_only_displays_on_interaction

答案 1 :(得分:0)

据我所知,官方的facebook分享按照你上面描述的方式设计。如果您使用http://www.fbshare.me,则会显示页面加载次数等。

答案 2 :(得分:0)

试试这个 http://addthis.com

答案 3 :(得分:0)

对我来说最简单的方法是在按钮上方添加一条css规则:

<style>
  .fb_share_no_count {
    display: block !important;
  }
</style>
<div>
  <a name="fb_share" type="box_count" expr:share_url="data:post.url" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</div>

答案 4 :(得分:0)

这个博客有答案,你必须破解FB.Share JS文件并更改一个参数,我可以在撰写本文时保证这一点。

http://kopepasah.com/social-media/facebook/facebook-share-count-button/

相关问题