Our Rails 3 app uses facebook-omniauth, allowing users to authenticate with facebook.
It'd be nice to use as much of the web based authentication system as possible, so I tried following the answer (the one that hasn't been down-voted) to this SO question but I can't get it to work.
The gist of the answer is:
omniauth-facebook will handle requests to the callback endpoint with an access_token parameter without any trouble. Easy :)
So to test this, in my browser I'm issuing the following request:
/users/auth/facebook_api/callback?access_token=BAAB...
But in my server log, I see:
(facebook) Callback phase initiated.
(facebook) Authentication failure! invalid_credentials: OAuth2::Error, :
{"error":{"message":"Missing authorization code","type":"OAuthException","code":1}}
I can't figure out what I'm doing wrong. Is the fact that I'm trying to do this through the browser to test messing something up? Any other ideas on how I can reuse my www based auth logic for my ios app?
UPDATE: I'm not sure, but I'm following this guide in order to have multiple facebook omniauth strategies, one for www and another for mobile.