List of usage examples for twitter4j AsyncTwitter getFriendsList
void getFriendsList(long userId, long cursor);
From source file:com.marpies.ane.twitter.functions.GetFriendsFunction.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.getFriendsList(screenName, cursor); }//w w w . j a v a 2 s .co 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.getFriendsList(userID, cursor); } return null; }