Created
May 21, 2009 20:29
-
-
Save amrnt/115716 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('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