Twitter Tweet Button 不计算在内 [英] Twitter Tweet Button does not count

查看:30
本文介绍了Twitter Tweet Button 不计算在内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用官方 Twitter 的推文按钮 来允许用户分享我的网站.

I am using the official Tweet Button from Twitter to allow users to share my site.

按钮本身工作正常,但是计数器不起作用并且一直保持为零.(在你发推后,它在客户端增加,但如果你按 F5,它会再次为零)

The button itself is working just fine, however the counter doesn't work and stays at zero all the time. (after you tweet, it is incremented client-side, but if you press F5, it will be zero again)

这是我包含按钮的非常简单的代码:

This is my really simple code to include the button:

<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.whattheplace.com/Show/1/" data-count="vertical">Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

指定的 URL (http://www.whattheplace.com/Show/1/) 是一个常规 URL,返回一个带有 HTTP 代码 200 的网页,即没有重定向等可能会混淆 Twitter.

The specified URL (http://www.whattheplace.com/Show/1/) is a regular URL returning a web page with HTTP code 200, i.e. no redirection or the like that could maybe confuse Twitter.

我在 http://www.whattheplace.com/static/上准备了一个小例子tweetbutton.html 在这里你可以看到问题.在 http://www.whattheplace.com 的真实"页面上,推文按钮由 AddThis 包裹,但问题完全一样.

I've prepared a small example on http://www.whattheplace.com/static/tweetbutton.html where you can see the problem. On the "real" page at http://www.whattheplace.com, the Tweet Button is wrapped by AddThis, but the problem is exactly the same.

我认为这可能与新的 Twitter URL 缩短器 (t.co) 有关,但我无法证明这一点,而且它似乎在其他人的页面上运行得很好.

I'm thinking that it might have something to do with the new Twitter URL shortener (t.co), however I can't prove it and it seems to work on other people's pages just fine.

推荐答案

有一些与此相关的可能问题.其中之一是,如果链接被缩短,除非您添加counturl" url 属性,否则 Twitter 不会添加它.

There are a few possible problems related to this. One of them is that if the link is shortened, Twitter won't add it up unless you add the "counturl" url property.

此外,Twitter 不计算来自受保护帐户(不分享其推文的帐户)的推文.

Also, Twitter doesn't count the tweets coming from protected accounts (accounts that don't share their tweets).

如果这些都没有提供解决方案,请告诉我.

Please let me know if none of this offers the solution.

干杯!

这篇关于Twitter Tweet Button 不计算在内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆