开发者

Get follower count on Twitter API search results

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

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

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开发者_Python百科 run it through http://twitter.com/users/show.xml to get the rest of the information.

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?


Update:

I have requested whitelisting, and the guys at Twitter told me I should instead use the new Streaming 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.


Only reliable user information you can get from twitter search results are username (from_user) and profile image url. If you want more information, you will have to call the users/show method for each user. There is no workaround or better way(that I'm aware of).

You will have to Cache user information and request whitelisting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜