Using Twitter4j, how do I filter using the statuses/sample and by a filter query?

Using Twitter4j, how do I filter using the statuses/sample and by a filter query?



How do I first get all the sample tweets from “GET statuses/sample” and then filter by a word?



I tried chaining as well but that didn't seem to work:
e.g. twitterStream.sample.filter(new FilterQuery("Microsoft")


TwitterStreamFactory tf = new TwitterStreamFactory(cb.build());
TwitterStream twitterStream = tf.getInstance();
twitterStream.addListener(listener);
twitterStream.sample():
twitterStream.filter(new FilterQuery("Microsoft"));



Thank you




1 Answer
1



Check this : stackoverflow.com/questions/16665683/filter-twitter4j-stream






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How can temperature be calculated given relative humidity and dew point?

Avoiding race conditions in Kotlin, Smartcast is impossible runtime exception

Oracle ADF: Log file reports ADFContext Leak