Last active
August 29, 2015 14:04
-
-
Save teshi04/2966faa6bdfe0eac52e5 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
SLICE_SIZE = 100 | |
def get_all_friends(screen_name) | |
client = twitter_client | |
all_friends = [] | |
client.friend_ids(screen_name).each_slice(SLICE_SIZE).each do |slice| | |
client.users(slice).each do |friend| | |
all_friends << friend | |
end | |
end | |
all_friends | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment