List of usage examples for twitter4j Twitter createUserListMember
UserList createUserListMember(long listId, long userId) throws TwitterException;
From source file:twitter4j.examples.list.CreateUserListMember.java
License:Apache License
/** * Usage: java twitter4j.examples.list.CreateUserListMember [list id] [user id] * * @param args message/*from ww w .j a v a 2 s . c o m*/ */ public static void main(String[] args) { if (args.length < 2) { System.out.println("Usage: java twitter4j.examples.list.CreateUserListMember [list id] [user id]"); System.exit(-1); } try { Twitter twitter = new TwitterFactory().getInstance(); twitter.createUserListMember(Integer.parseInt(args[0]), Integer.parseInt(args[1])); System.out.println("Successfully added the user to the specified list."); System.exit(0); } catch (TwitterException te) { te.printStackTrace(); System.out.println("Failed to add users: " + te.getMessage()); System.exit(-1); } }