Skip to content

Instantly share code, notes, and snippets.

@onurmatik
Created January 21, 2016 11:08
Show Gist options
  • Save onurmatik/0577123e3126cbb36f85 to your computer and use it in GitHub Desktop.
Save onurmatik/0577123e3126cbb36f85 to your computer and use it in GitHub Desktop.
from twython import Twython, TwythonStreamer
tokens = [
]
username = ''
rest_client = Twython(*tokens)
class Streamer(TwythonStreamer):
def on_success(self, data):
if 'text' in data:
rest_client.update_status(
status=u'hihihii... ' + data['text'].lower()
)
stream_client = Streamer(*tokens)
userid = rest_client.lookup_user(screen_name=username)[0]['id']
stream_client.statuses.filter(follow=userid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment