Reputation: 325
When I search for a given hashtag, I get the results for recent tweets containing that hashtag. This is what I want to stream, So if any new tweets with this hashtag are made I will know.
Upvotes: 3
Views: 4124
Reputation: 3446
Twitter twitter = new TwitterFactory().getInstance();
try {
QueryResult result = twitter.search(new Query("#myhashtag"));
} catch (TwitterException te) {
te.printStackTrace();
}
You may need to escape the #
symbol
Upvotes: 4