Hi folks, I am in desperate need of guidance. I have been using ionic v1 and my app uses php laravel as the back-end. I manage to get login to work using ng-Cordova oAuth and get a long-lived token for each login. However when I logout, I realize that the long-lived token is still valid and there is no way I can terminate it by firing facebook graph API requests. So far the only measure I can do is deleting the token from local storage and from my server database as well. Funny thing is the ngCordova doesn’t have any logout function.
I tried calling curl DELETE /{user-id}/permissions using graph facebook URL. Didn’t work. Anyone has a solution?
Please help
Please provide links to the library you are using, I am not 100% sure what you are talking about here.
How would one get rid of or invalidate the token when implementing the API manually?
As you can see there is no logout
This implementation of the API does not have it. I asked how the API from Facebook wants it to be done.
The plugin you linked to uses the same mechanisms as described here:
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow?locale=en_US
Here is what it has to say about logout/revoke:
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow?locale=en_US#logout
This then links to the link you posted - so it seems you have the correct thing and only have to implement it manually.