Monday 15 July 2013

python - Getting mentions and DMs through twitter stream API 1.1? (Using twython) -


I am using Twython (Twitter API Library for python) to connect with streaming API, but only me public Twitter Stream Probably Filtered By Words Is there no way to get a real-time stream of certified user timeline or @ mentting?

I'm looping the REST API through late calls to get those calls, but to make many requests like Twitter to me.

The Twython documentation is not helping me much about this, nor is the official Twitter Doc.

If there is another Python Library which can do better than twython for streaming (for Twitter API v1.1) I would appreciate the suggestion ... Thank you.

At the beginning of my research I thought Twitter library for dragon but end In, it seems that is more popular and support is also Twitter Streaming.

It is a bit tricky, streaming APIs and reverse APIs are not equal to direct messages. This small example script indicates how you can use the user stream to get a direct message:

  Import Twitter # if # OAuth in this module Or stream, check if the sixhics 'Twitter' module is used! Auth = twitter.OAuth (consumer_key = '...', consumer_cent = '...', token = '...', token_cent = '...') stream = Twitter. Stream This script will print all new messages - script initialization. Have not been received before.   

No comments:

Post a Comment