Skip to content

Instantly share code, notes, and snippets.

@ivey
Created December 1, 2009 02:06
Show Gist options
  • Save ivey/245994 to your computer and use it in GitHub Desktop.
Save ivey/245994 to your computer and use it in GitHub Desktop.
class User < TwitterAuth::GenericUser
def twitter_oauth_client
oauth = Twitter::OAuth.new(TwitterAuth.consumer.key,TwitterAuth.consumer.secret)
def oauth.setup_from_twitter_auth(at,as,t)
@atoken = at
@asecret = as
@access_token = t
end
oauth.setup_from_twitter_auth access_token, access_secret, token
Twitter::Base.new(oauth)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment