I'm building an app containing a WebView that loads a website. When the user presses on the "connect with Facebook" on the website I immediately open up the "Login with Facebook" using the Facebook SDK to make the authentication step easier using the app on the user device instead of the web form.
Now, my website is using vBulletin that when login finished it is redirected to:
http://mywebsite.com/community/index.php?dofbredirect=1&code=[MY_CODE]&state=[SOME_STATE]
The state I can get from the webview which was loaded when the user pressed the "Connect with facebook" in the website, but the code is something that I can't have, I can only obtain access token.
Is there is any method of exchanging code instead of access token using the Facebook SDK?
Simply click on ones you want to revoke, and like Facebook, you will see details of that website. Click “Revoke access” at the bottom and that's it. Instead of asking you to confirm like Facebook does, Twitter turns the revoke link into an “undo revoke access” link if you suddenly change your mind.
The SDK request a response_type
of value token
. It looks like to achieve what you want, you need to manually build the login handler and request a response_type
of value code
. More about this here:
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/
Source: https://github.com/facebook/facebook-android-sdk/blob/b384c0655fe96db71229bfdcb981a522f3f1e675/facebook/src/com/facebook/internal/ServerProtocol.java#L59-L60
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With