There are multiple ways to achieve this.
Method 1:
You can enable a deauthorize callback through the App Dashboard. Just go to your app, then choose the Products, then Facebook Login, and finally Settings.
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow#deauth-callback
Method 2:
By configuring a Permissions Webhook to your app:
- Add the "Webhooks" product to your app
- Select "Permissions" from the list
- Configure the Callback URL, Verify Token & enable the "Include values" switch
- Subscribe to the "connected" field: https://developers.facebook.com/docs/graph-api/webhooks/reference/permissions/#connected
You will now receive the following object when a user installs/removes your app:
"object": "permissions", "entry": [{"id": "10000123456789", "uid": "10000123456789", "time": 1576834276, "changes": [{"verb": "revoked", "field": "connected"}]}]}
Where "uid" is the account id of the user (app scoped user ID).
Additionally, you can also subscribe to individual permissions a user accepts/removes in your app, such as email address:
{"object": "permissions", "entry": [{"id": "10000123456789", "uid": "10000123456789", "time": 1576836231, "changes": [{"value": {"verb": "revoked"}, "field": "email"}]}]}