List of usage examples for twitter4j Twitter showSavedSearch
SavedSearch showSavedSearch(long id) throws TwitterException;
From source file:twitter4j.examples.savedsearches.ShowSavedSearch.java
License:Apache License
/** * Usage: java twitter4j.examples.savedsearches.ShowSavedSearch [saved search id] * * @param args message//from w w w . ja va 2s .c o m */ public static void main(String[] args) { if (args.length < 1) { System.out.println("Usage: java twitter4j.examples.savedsearches.ShowSavedSearch [saved search id]"); System.exit(-1); } try { Twitter twitter = new TwitterFactory().getInstance(); SavedSearch savedSearch = twitter.showSavedSearch(Integer.parseInt(args[0])); System.out.println("[name:" + savedSearch.getName() + " query:" + savedSearch.getQuery() + " id:" + savedSearch.getId() + "]"); System.exit(0); } catch (TwitterException te) { te.printStackTrace(); System.out.println("Failed to get the saved search: " + te.getMessage()); System.exit(-1); } }