Skip to content

Instantly share code, notes, and snippets.

@amrnt
Created May 21, 2009 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amrnt/115716 to your computer and use it in GitHub Desktop.
Save amrnt/115716 to your computer and use it in GitHub Desktop.
require('rubygems')
gem('twitter4r', '0.3.1')
require('twitter')
require('twitter/console')
login = 'TWITTER_USERNAME'
password = 'TWITTER_PSSWORD'
@@client = Twitter::Client.new(:login => login, :password => password)
while @@client.my(:friends).size >= 0 # while... because it calls 100 friends at each request
puts "\n\n######## friends ########\n"
@@client.my(:friends).each do |f|
puts f.screen_name # just to show your friends' screen name
@@client.friend(:remove, f.id)
end
puts "############################\n\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment