List of usage examples for twitter4j Twitter getOutgoingFriendships
IDs getOutgoingFriendships(long cursor) throws TwitterException;
From source file:twitter4j.examples.friendship.GetOutgoingFriendships.java
License:Apache License
/** * Usage: java twitter4j.examples.friendship.GetOutgoingFriendships * * @param args message/*from w w w .j a va2 s . c o m*/ */ public static void main(String[] args) { try { Twitter twitter = new TwitterFactory().getInstance(); long cursor = -1; IDs ids; System.out.println("Showing outgoing pending follow request(s)."); do { ids = twitter.getOutgoingFriendships(cursor); for (long id : ids.getIDs()) { System.out.println(id); } } while ((cursor = ids.getNextCursor()) != 0); System.exit(0); } catch (TwitterException te) { te.printStackTrace(); System.out.println("Failed to get outgoing friendships: " + te.getMessage()); System.exit(-1); } }