Skip to content

Instantly share code, notes, and snippets.

@TBD
Created August 23, 2009 21:49
Show Gist options
  • Save TBD/173470 to your computer and use it in GitHub Desktop.
Save TBD/173470 to your computer and use it in GitHub Desktop.
# quick hack to get the following accounts of two twitter accounts
require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter')
httpauth = Twitter::HTTPAuth.new('account_2_email', 'account_2_pass')
twitter = Twitter::Base.new(httpauth)
filter = proc {|f| f.screen_name }
friends_2 = twitter.friends.map(&filter)
# ---
httpauth = Twitter::HTTPAuth.new('account_1_email', 'account_1_pass')
twitter = Twitter::Base.new(httpauth)
friends_1 = twitter.friends.map(&filter)
p (friends_2 - friends_1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment