I need to stream all public tweets which contain a certain hashtag AND replies to a certain account (which I own) and store them in a database. However, I can’t get Twitter4j to do this for me.
Is there something I’m missing? I’ve only been able to stream my timeline.
You cannot specify criteria like “replies to a certain account” with filter stream.
However, it is possible to detect if a tweet is a reply to a certain account by using Status#getUserMentionEntites().
The code will be like this: