I am able to get tweets from a specific account using the streaming API. I can also manage to get tweets for specific #tags like below:
endpoint.trackTerms(Lists.newArrayList("twitterapi", "@myTwitter"));
and
endpoint.trackTerms(Lists.newArrayList("twitterapi", "#yolo"));
I wonder how to merge these two queries as I want to get specific tweets (#yolo) from a specific user (@myTwitter)
Code can be found here https://github.com/twitter/hbc
Take a look to Twitter's documentation on the streaming API, how to track terms:
twitter-hbconly allows to track terms separated by commas, so if you do this,You will actually be doing
@myTwitter OR #yolo, take a look to the implementation of the methodtrackTerms,Instead of using
trackTerms, you could add the terms directly to the endpoint like this,Or of course you could create a new method.
Hope it helps.