Skip to content

Instantly share code, notes, and snippets.

@drewconway
Created February 25, 2009 17:05
Show Gist options
  • Save drewconway/70278 to your computer and use it in GitHub Desktop.
Save drewconway/70278 to your computer and use it in GitHub Desktop.
import twitter
import networkx as NX
# Create an authenticated Api object in order to download user data
api_user='drewconway'
api_pswd='peugeot'
api=twitter.Api(username=api_user,password=api_pswd)
# The seed user to be analyzed
seed='drewconway'
# Now create network
k=2 # Number of snowball rounds (WARNING: k>2 will most certainly exceed the Twitter API rate limit)
twitter_net=snowball_build(api,seed,k)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment