Created
July 2, 2011 22:46
-
-
Save rdetert/1061742 to your computer and use it in GitHub Desktop.
Using Omniauth to Login to Facebook with an Access Token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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