Counting a Group of Twitter Users' Followers
I'm wanting to setup an app that will retrieve开发者_如何学Python all follower's IDs, count how many followers each has, and sum the total.
Example: MyAccount > MyFollowersAccount > followers_count
I want to do this for each follower and then add the total amount of followers they all have. So if I have 100 followers and my followers have 100 followers, I should get a return value of 10,000 followers or 10,100 (including my own).
I am having difficulty figuring out how to do this with multiple users. I've seen ones that will retrieve a single user, but I'm worried about looping through potentially 1,000 of followers.
Any ideas or suggestions?
MyAccount > MyFollowersAccount > followers_count
What I would do is this,
run the Twitter API method GET followers/ids
https://api.twitter.com/1/followers/ids.json?cursor=-1&screen_name=twitterapi
to get the ID's of the followers of screenname X
and then switch over to Twitter Counter which will give you a more detailed list and information about the followers, followers specifically. Also, this could be a way to split up the two calls so you won't be blocked by a rate limit problem on one end.
http://twittercounter.com/pages/api?ref=footer
精彩评论