How can I notified when any user revoke my application access form his twitter account?


How can I notified when any user revoke my app access form his twitter account?
When an user sign in with twitter at my app it store the accesstoken and secret key for next time using. But any user can revoked my app and then my stored accessetoken will be invalid. Consider I have 10 accesstoken stored in database. 3 of those already revoked but i don’t know. Now I want to send a tweet to all account I get error to use any unknown revoked accesstoken.
My Need: When any user revoked my app twitter should send a request with the user id to my application url so that i can delete that user from my database to avoid next time API request error.

Have any way already exists?


The API doesn’t send you a notice when the token has been revoked. You’ll only know when you attempt to use the token. There’s really no punishment to you to get an error when the authorization is invalid – just plan for that case in advance. Use account/verify_credentials before posting to determine if you still have the ability to make calls on that user’s behalf.