Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import twitter
- import networkx as NX
- import time
- # Create an authenticated Api object in order to download user data
- api_user='your_twitter_id'
- api_pswd='your_twitter_password'
- api=twitter.Api(username=api_user,password=api_pswd)
- # The seed user to be analyzed
- seed='someone_who_needs_friends'
- # 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)
Add Comment
Please, Sign In to add comment