Skip to content

Instantly share code, notes, and snippets.

@rdetert
Created July 2, 2011 22:46
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 rdetert/1061742 to your computer and use it in GitHub Desktop.
Save rdetert/1061742 to your computer and use it in GitHub Desktop.
Using Omniauth to Login to Facebook with an Access Token
FB = OmniAuth::Strategies::Facebook.new("nothing")
client = ::OAuth2::Client.new("nothing", "nothing", FB.client_options)
cached_token = "app_id_part|session_id_part|token_part" # or maybe you sent it from the iPhone
access_token = ::OAuth2::AccessToken.new(client, cached_token)
FB.instance_variable_set("@access_token", access_token)
FB.user_info
FB.auth_hash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment