Get the tweets a user sees on his twitter account


I can get the tweets posted by a person, but I don’t know if it is posible to get the tweets that a user would see on his twitter when he logs in.

Im using twitter for java library

Is it possible, how can it be done?


The API method you want is GET statues/home_timeline which is only accessible with authorization from the user. Assuming you are using twitter4j have a look at getHomeTimeline.


that function only allows me to get my own “HomeTimeLine”, what can I do to have the HomeTimeLine of a user whose user/password I have been given?


You shouldn’t be “given” the user/pw of another user. They should authenticate to your app using OAuth, and then use the token to call the endpoint.


So the user of my aplication has (without alternative) to visit:…_relative_to_my_app

so he can get a ping to input in my app.

There’s no other way? If the user does not need to leave the desktop app (to go to the browser) it would be a little bit better for me.

Thanks in advance, you have been very helpful so far


The OAuth flow requires the user to authenticate the application against their Twitter account - that’s a web-based flow.