我用它来获取我最新的推文
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js" ></script>
<script type="text/javascript"src="http://twitter.com/statuses/user_timeline/username.json?callback=twitterCallback2&count=2"></script>
所以我必须获取最新的 2 条推文,因为我将计数设置为 2,有时它只返回 1,这是为什么?
最佳答案
我今天实际上遇到了同样的问题,在文档中,twitter 不会在列表中返回转发推文以实现向后兼容性:
count. Optional. Specifies the number of statuses to retrieve. May not be greater than 200. (Note the the number of statuses returned may be smaller than the requested count as retweets are stripped out of the result set for backwards compatibility.)
http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses-user_timeline
这可能是导致您出现这种情况的原因。
关于javascript - 推特 API 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2512343/