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