Stream Tweets from Protected Accounts

python

#1

How could I stream tweets from my Twitter timeline that includes protected accounts with Python? Is this possible?


#2

I am an authorized follower of several private twitter users and I am able to get all their status updates by making manual requests to the REST API successfully. However, I can’t stream real-time tweets from these same users. Is this the kind of problem you’re having, as well?


#4

Yes exactly.


#6

Hi - if you use the GET statuses/home_timeline endpoint, you should be able to get Tweets from private accounts that you follow.

For more information on this endpoint, please review our documentation here.


#7

Hi Aurelia, thank you for your response. Perhaps I misunderstand, but what you describe seems like a solution to access historical tweets on a manual/pull basis from the REST API versus what I am looking for, which is to be able to live-stream them automatically on a push basis from the STREAMING API.

I have no difficulty accessing tweets from protected accounts I follow using the method you describe.

I have difficulty having tweets live-streamed to me from those same protected accounts. So far I can see only replies to the original tweets I am interested in having streamed to me. I want the original tweets themselves sent to me as soon as they are created.

Can you please clarify?


#8

Hi - unfortunately, there is no endpoint that supports getting those Tweets realtime. The only option is to use the GET statuses/home_timeline endpoint, as mentioned above.


#9