I need to catch the tweets I recieve in my timeline from the people I follow.
The code I have is:
*import sys
import tweepy
from tweepy import Stream
from tweepy.streaming import StreamListener
CONSUMER_KEY = 'fgdg'
CONSUMER_SECRET = 'fdgdfgdf'
ACCESS_KEY = 'fgdfgd'
ACCESS_SECRET = 'dfgdfgdfg'
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = tweepy.API(auth)
class listener(StreamListener):
def on_data(self, data):
print data
return True
def on_error(self, status):
print status
twitterStream = Stream(auth, listener())
twitterStream.filter(track=["order"])*
But this give me the PUBLIC STREAM. I only want MY TIMELINE STREAM
Thanks in advanced
For more information, look at the docs: https://dev.twitter.com/docs/api/1.1/get/user and https://dev.twitter.com/docs/streaming-apis/parameters#with.
twitterStream = Stream(auth, listener()) twitterStream.userstream("with=following")
witterStream.userstream(with="following")