获取 Twitter API 搜索结果的关注者数量 [英] Get follower count on Twitter API search results

查看:24
本文介绍了获取 Twitter API 搜索结果的关注者数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要做的是提取一些搜索结果,并按用户对它们进行排序.

What I'm trying to do is pull some search results, and sort them by users.

现在我正在使用$to->OAuthRequest('http://search.twitter.com/search.json', array('q' => 'search-term'), 'GET');

Right now I'm using $to->OAuthRequest('http://search.twitter.com/search.json', array('q' => 'search-term'), 'GET');

获取结果,但我实际上无法获取有关用户的信息,例如 follower_count 等,因此我虽然会获取每个结果的 user_id,然后通过 http://twitter.com/users/show.xml 以获取其余信息.

to get the results, but I can't actually get information about the user like follower_count, etc. so I though I'd take each result's user_id, and run it through http://twitter.com/users/show.xml to get the rest of the information.

问题是,如果我这样得到 50 个结果,那就是 50 个 API 调用,这是每小时限制的 1/3...

The problem is, if I get 50 results that way, that's 50 API calls, which is 1/3 of the hourly limit...

有没有更好的方法来做到这一点?

Is there a better way to do this?

推荐答案

更新:

我已请求列入白名单,而 Twitter 的人告诉我,我应该改用新的 StreamingAPI.

I have requested whitelisting, and the guys at Twitter told me I should instead use the new Streaming API.

这有点糟糕,因为它在 Alpha 测试中,文档不清楚,但概念看起来很酷,而且限制与常规 API 不同.稍后会深入研究.

This kinda sucks since it's in Alpha testing, and the documentation is unclear, but the concept looks cool, and the limits are different than the regular API. Gonna dive into it later.

这篇关于获取 Twitter API 搜索结果的关注者数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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