Reputation: 3596
Recently i keep on trying with differences methods on how to consume Twitter Streaming API. The purpose i need so is not the oath but i need to perform keyword search and get the public tweets and its information only. My environment is Google AppEngine + Python 2.7 which is not really allow third party library.
What i tried but it seem outdated and these code are applicable for Python console only.
I failed to do make it work on Google App Engine environment while most of the resources available are 3 years back, and most of them are not make for GAE. Please guide. Thanks
Upvotes: 2
Views: 2567
Reputation: 6279
It is not possible to use the Twitter Streaming API from Google App Engine.
GAE doesn't support listen sockets, only outbound sockets. You'll have to use another service, like Google Compute Engine, Heroku, or AWS, or find a way to use the the Twitter REST APIs instead.
Upvotes: 0
Reputation: 4205
Tweepy works fine on AppEngine. Be sure to include the tweepy library into your appengine app's root directory (this negates the 'which is not really allow third party library').
I'de like to provide more insight, but I'm not sure what task you're unable to fulfill with the libraries stated above; is something failing when you're fetching from the Streaming API? Tweepy has support for interfacing with the Streaming API - it's worth looking at https://github.com/gumptionthomas/tweepy-appengine/blob/master/tweepy/streaming.py
Don't know if this is helpful at all -- but if you're interested in looking at a GAE + Twitter setup, I have published a twitterbot (that's powered by Google Analytics -- but you can ignore that part) on github: https://github.com/nirvanatikku/ga_twitterbot.
Upvotes: 3