Skip to content

Instantly share code, notes, and snippets.

Last active May 2, 2018 02:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
scripts to help manage twitter account
import twitter
import csv
# get these from
api_key = ''
api_secret = ''
access_key = ''
access_secret = ''
api = twitter.Api(consumer_key=api_key, consumer_secret=api_secret,
access_token_key=access_key, access_token_secret=access_secret)
with open('following.csv', 'w') as f:
out = csv.writer(f)
for friend in api.GetFriends(skip_status=True):
out.writerow((, friend.screen_name, friend.created_at,
friend.followers_count, friend.protected,,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment