[SOLVED] Facebook revoke app access from this app – NodeJs

Issue

On the app I’m working on I have implemented the "Login with Facebook" feature using passport-facebook library. I only use this feature in order to create a new user account, link existing acount with facebook and authenticate the user.

1 – Now I would like to implement a button in order to allow the user to revoke the app permission from his facebook account. But I cant find any documentation about api or anything else. Is it possible ? The only way I found is that the user has to connect to his facebook account and revoke it manually from the settings :/

2 – I would also like to receive the information if the user revoke app permission manually from his facebook account. For that I think I should use the facebook ‘User’ webhooks but I’m not sure if I will receive the information ?

Thanks for your time 🙂

Solution

1 – permissions can be revoked using a DELETE request; if you revoke all of them instead of any specific ones, that effectively revokes the whole login.

https://developers.facebook.com/docs/facebook-login/guides/permissions/request-revoke#revoking

2 – not via the user webhook, but you can specify a Deauthorize Callback URL explicitly for this purpose.

https://developers.facebook.com/docs/facebook-login/guides/advanced/manual-flow#deauth-callback

Answered By – CBroe

Answer Checked By – Pedro (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published.