Search code examples
twitterreal-timetwitter4jhashtag

How to get live stream of twitter with multiple hashtags


I want to listen to real time all the tweets which has #abc #def hashtags for example,

preferred language is Java but raw API is great too

I couldn't find the documentation that describes it


Solution

  • I don't have experience with twitter4j, but what you'll need to utilize their Streaming API example.

    From that you'll need to include filter method.

    A more detailed example is found in this example

        FilterQuery fq = new FilterQuery();
    
        String keywords[] = {"ireland"};
    
        fq.track(keywords);