Created
March 24, 2009 08:45
-
-
Save paulca/84003 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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