Created
April 19, 2010 16:54
-
-
Save nazt/371282 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'twitter' | |
config = YAML::load(open(".twitter")) | |
httpauth = Twitter::HTTPAuth.new(config['email'], config['password']) | |
base = Twitter::Base.new(httpauth) | |
base.followers.each do |follower| | |
if !follower.following | |
begin | |
base.friendship_create(follower.id, true) | |
rescue | |
puts "An error occurred: #{$!}" | |
end | |
puts "Created friendship with #{follower.screen_name}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment