List of usage examples for twitter4j AsyncTwitter getFollowersList
void getFollowersList(long userId, long cursor);
From source file:com.marpies.ane.twitter.functions.GetFollowersFunction.java
License:Apache License
@Override public FREObject call(FREContext context, FREObject[] args) { super.call(context, args); long cursor = FREObjectUtils.getDouble(args[0]).longValue(); long userID = FREObjectUtils.getDouble(args[1]).longValue(); String screenName = (args[2] == null) ? null : FREObjectUtils.getString(args[2]); mCallbackID = FREObjectUtils.getInt(args[3]); AsyncTwitter twitter = TwitterAPI.getAsyncInstance(TwitterAPI.getAccessToken()); twitter.addListener(this); /* Query followers for screen name */ if (screenName != null) { twitter.getFollowersList(screenName, cursor); }//from w w w .j a va2 s . c o m /* Or query for user ID */ else { /* If user ID was not provided then use the one of currently logged in user */ if (userID < 0) { userID = TwitterAPI.getLoggedInUser().getId(); } twitter.getFollowersList(userID, cursor); } return null; }