Skip to content

Instantly share code, notes, and snippets.

@brenguy
Created January 31, 2017 03:47
Show Gist options
  • Save brenguy/cbe0b9726c93a00f995f11ed6d82a192 to your computer and use it in GitHub Desktop.
Save brenguy/cbe0b9726c93a00f995f11ed6d82a192 to your computer and use it in GitHub Desktop.
import tweepy
import json
screen_name = "$TWITTERNAME"
auth = tweepy.OAuthHandler("$CONSUMER_KEY", "$CONSUMER_SECRET_KEY")
auth.set_access_token('ACCESS_TOKEN', 'ACCESS_TOKEN_SECRET')
api = tweepy.API(auth)
historical_tweets = api.user_timeline(screen_name = screen_name,count=200)
for tweet in historical_tweets:
print tweet.text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment