Skip to content

Instantly share code, notes, and snippets.

@ahmdrefat
Created November 12, 2012 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmdrefat/ddcb280370af4b19c5bb to your computer and use it in GitHub Desktop.
Save ahmdrefat/ddcb280370af4b19c5bb to your computer and use it in GitHub Desktop.
def oauth_account
if TwitterOauthSetting.find_by_user_id(current_user.id).nil?
@request_token = session[:request_token]
@access_token = @request_token.get_access_token(:oauth_verifier => params["oauth_verifier"])
TwitterOauthSetting.create(atoken: @access_token.token, asecret: @access_token.secret, user_id: current_user.id)
update_user_account()
end
redirect_to "/twitter_profile"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment