-
Notifications
You must be signed in to change notification settings - Fork 216
Friendships
linvi edited this page Jun 2, 2015
·
11 revisions
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 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>);
Please note that retrieving all the followers of a user might take a LOT of time. Please consider using Threads or Async Tasks.
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);
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.