Skip to content

Friendships

linvi edited this page Jun 1, 2015 · 11 revisions

Get Followers

Rate Limit Considerations It is important to understand that due to Twitter REST API limits, you will have to consider using the RateLimit class to get all the followers of a famous person.

Get SOME of the followers

// Get the first 250 followers of the user
var followers = User.GetFollowers(<user_identifier>);

// Get the first 5000 followers' ids of the user
var followerIds = User.GetFollowerIds(<user_identifier>);

Get ALL the followers

Please note that retrieving all the followers of a user might take a LOT of time. Please consider using Threads or Async Tasks.

Track And Await : "Catch them all!"

The first and easiest way to get all the followers of a specific member is to use the TrackAndAwait option of the RateLimit awaiter.

// Tweetinvi will now wait for tokens to be available before performing a request.
RateLimit.RateLimitTrackerOption = RateLimitTrackerOptions.TrackAndAwait;

// Get ALL the followers' ids of a specific user
var followerIds = User.GetFollowerIds(<user_identifier>, Int32.MaxValue);

Twitter Accessor : "Divide to conquer!"

This solution is more complex as it has not yet been implemented in Tweetinvi. We will need to use the appropriate tools to execute Cursor Custom Queries.

Clone this wiki locally