I'm trying to just connect to the Twitter streaming API using tweepy (and python 3) and transfer all tweets from one user.
I had the impression that it was possible, so for this I need the following simple code:
from tweepy import StreamListener from tweepy import Stream import tweepy auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) auth.set_access_token(ACCESS_KEY, ACCESS_SECRET) api = tweepy.API(auth) class StdOutListener(StreamListener): def on_data(self, data):
When I run this from the command line, I just return a bunch of 406 codes from Twitter. Is there something very clearly wrong with the way I try to use tweepy, or is it a follow parameter that is not intended to do what I think it is doing?
EDIT: I also posted this on tweepy discussion boards, FYI.
source share