Search code examples
oauthtwitter-oauthaccess-tokenfacebook-oauth

Check if Ouath token is invalid


Is there a way to send a request to Facebook and Twitter with a token to see if it has been invalidated. I know if I change my password on facebook I invalidate my tokens so if a user of my app does this I would like to display that as inactive and prompt them to re-auth their account to continue using it.


Solution

  • Just use the token against https://graph.facebook.com/me. If it has expired, it'll tell you.