Twitter4j Stream to get own profile tweets

201 Views Asked by At

I am trying to use the twitter4j api to retrieve my own tweets only (ie, every 3 sec). After using the manual "ResponseList statuses = twitter.getHomeTimeline();" , i encountered a problem which the request rate was capped.

The solution i can find is to use stream service. Right now, my stream does not do anything even i update my twitter post.

EDIT 1:

I am able to get it work with my own search criteria. But i am unable to stream once my tweet is private and it works by hashtag search criterion. Any suggestions? I would like to protect my tweets yet able to see my own twitter post stream only.

Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

You need to make an UserStream and you'll get the tweets as seen by the profile you made the TwitterApp. It'll return private tweets, I just checked (: