Skip to content

Instantly share code, notes, and snippets.

@paulca
Created March 24, 2009 08:45
Show Gist options
  • Save paulca/84003 to your computer and use it in GitHub Desktop.
Save paulca/84003 to your computer and use it in GitHub Desktop.
require 'twitter'
# your Twitter credentials
twitter_username = ''
twitter_password = ''
# the user you'd like to check friends / followers for. Set to nil, or omit for your own list
search_user = ''
client = Twitter::Base.new(twitter_username,twitter_password)
page = 1
full_friends_list = []
loop do
begin
puts "fetching page #{page}"
followers = c.followers_for(search_user, :page => page)
full_friends_list += followers.map { |u| u.screen_name }
break if followers.empty?
page = page + 1
rescue
break
end
end
full_friends_list.sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment