Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: How to get all the followers

$
0
0
Hi there,

This is possible in Tweetinvi 0.9 and very easy to do:
var ladygaga = User.GetUserFromScreenName("ladygaga");
var followers = ladygaga.GetFollowers(2000);
Now I would like you to be very careful with this!
Twitter does not provide a method to retrieve all the followers of a specific user.

To get a list of followers from a User we first need to use a cursored query retrieving a specific number of followers Ids :
https://dev.twitter.com/docs/api/1.1/get/followers/ids

Limit : 5000 * 180 = 900 000 ids

When this is done we need to use user lookup to get user informations :
https://dev.twitter.com/docs/api/1.1/get/users/lookup

The last one is limited to 180 requests per user connected and every request can get a maximum of 100 users.
Consequently you can get up to 180 x 100 = 18 000 followers with a specific credential.

Please be sure that you need to get all the followers and not all the follower ids. If you need the follower ids then you can get up to 900.000 follower ids.
Also please note that these limits are reset every 15 minutes.

Hope this helps.
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>