Facebook喜欢和分享计数显示相同的数字

时间:2012-05-15 05:26:26

标签: facebook facebook-graph-api

我的页面上有fb-like和fb-share按钮,但是当我点击或分享按钮时,同时和分享的数量会同时增加。

例如,如count = 4和share count = 3 喜欢我的网页喜欢count = 5和share count = 5

这是问题

enter image description here

类似fb的按钮代码

<iframe src="http://www.facebook.com/plugins/like.php?href=<%=ShareURL.ToString() %>&layout=button_count&show_faces=false&width=100&action=like&font=lucida+grande&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border: none; overflow: hidden; width: 85px;height: 21px;" allowtransparency="true">

fb-share按钮代码

 <div style="display: inline; float: right; margin-removed 80px;">
   <a href="http://www.facebook.com/sharer.php" name="fb_share">
      share_url="<%=ShareURL.ToString() %>" type="button_count">Share</a>
   <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share">
          type="text/javascript"></script>

2 个答案:

答案 0 :(得分:3)

Facebook赞和分享的计数器必须显示相同的数字。看官方说明: https://developers.facebook.com/docs/plugins/share-button#faqlikecount

  

我的“共享”按钮旁边显示的数字是什么?

     

显示的数字是:

的总和      
      
  • 您的网址的喜欢数量
  •   
  • 您网址的分享数量(包括将链接复制/粘贴回Facebook)
  •   
  • Facebook上关于您的网址的故事的喜欢和评论数量
  •   

可以在Like按钮常见问题解答中找到相同的规则:https://developers.facebook.com/docs/plugins/like-button#faq

答案 1 :(得分:0)

让您使用相同的应用程序变量进行类似和共享计数。因此,当您增加份额时,您的计数会继续增加。

为每个使用不同的变量。