List of usage examples for twitter4j TwitterListener TwitterListener
TwitterListener
From source file:TwitterListenerSnippet.java
License:BEER-WARE LICENSE
public void setupListener(Configuration c) { filtreListener = "love"; TwitterStream ts = new TwitterStreamFactory(c).getInstance(); FilterQuery filterQuery = new FilterQuery(); filterQuery.track(new String[] { filtreListener }); // On fait le lien entre le TwitterStream (qui r\u00e9cup\u00e8re les messages) et notre \u00e9couteur ts.addListener(new TwitterListener()); // On d\u00e9marre la recherche ! ts.filter(filterQuery);/* w w w . j ava 2 s . c o m*/ }