require 'rubygems' require 'twitter' userA = 'TWITTER_ID_A' userB = 'TWITTER_ID_B' consumer_key = 'OAUTH_CONSUMER_KEY' consumer_secret = 'OAUTH_CONSUMER_SECRET' access_token = 'OAUTH_ACCESS_TOKEN' access_secret = 'OAUTH_ACCESS_SECRET' oauth = Twitter::OAuth.new(consumer_key, consumer_secret) oauth.authorize_from_access(access_token, access_secret) tw = Twitter::Base.new(oauth) puts 'Get ' + userA