I'm new to this Twitter4j library. I am trying to store all the followers ID's of a user with given userID
. I am using something like the following:
IDs ids;
long cursor = -1;
do{
ids = twitter.getFollowersIDs(userName, cursor);
for (long id : ids.getIDs()) {
// Store this id...
}
while ((cursor = ids.getNextCursor()) != 0);
After a while, I get the error Rate limit exceeded
, it's OK. However, I don't know how to continue to store follower's IDs of the given userID when my rate limit problem fixed in the future?
PS: The userID
s whom I'm tryin to store follower's ID's have more than 3 million followers. It's why I need to continue from the place where I left.