DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Quick Script To Download Members Of Twitter List Using Ruby And Twitter Gem

  • submit to reddit
        // Use twitter gem to download members of ruby list, using cursors for multiple pages


require 'rubygems'
require 'twitter'

httpauth ='<username>', '<password>')

client =

m = client.list_members('<listowner>', '<listname>', -1)
while m.next_cursor != 0
m.users.each {|ppc| puts ppc.screen_name}
m = client.list_members('<listowner>', '<listname>', m.next_cursor)