The facebook OAuth dialog redirects back to the provided redirect_uri without prompt if the user has previously approved access to the application and provided all permissions ...
I want to overwrite that behavior and force the dialog to ask the user again for permissions ...
wonder if this can be done, since the documentation provide no help on whether this is doable or not.
I know this is an old post, but I just came across it and since I found the correct answer elsewhere, I thought I'd post it here.
You can send the auth_type=reauthorize
.
AFAIK, auth_type
has the following options:
* reauthorize
always has for permissions
* rerequest
for declined/revoked permissions
* reauthenticate
always as user to confirm password.
As @Igy has already mentioned, you can revoke user access by issues DELETE
request to me/permissions
endpoint. The rest is simple:
FB.api('me/permissions', 'delete', function (r1) {
// FB.login relies on FB.getLoginStatus.
// Force reloading the login status.
FB.getLoginStatus(function (r2) {
FB.login(function (r3) {});
}, true);
});
Why would you want to do this? Getting users past the permissions stage is a critical step that often loses you a lot of traffic. When the pop up is shown, is managed completely by Facebook anyway, so it's not possible to ask someone to accept permissions when they have already done it. The only time they would see the request again is if they first revoke the permissions, or if your app increases the level of access being requested.
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