Displaying 1 result from an estimated 1 matches for "find_or_create_by_screen_name".
2010 Jul 01
6
Close Modalpopup with RJS
...uth.authorize_from_request(session[''rtoken''], session[''rsecret''],
params[:oauth_verifier])
session[''rtoken''] = nil
session[''rsecret''] = nil
profile = Twitter::Base.new(oauth).verify_credentials
user = User.find_or_create_by_screen_name(profile.screen_name)
user.update_attributes({
:atoken => oauth.access_token.token,
:asecret => oauth.access_token.secret,
})
sign_in(user)
# page << "window.close()"
redirect_to session[:return_to] rescue redirect_to :controller =>
"home&qu...