Can I use Twitter PHP API to deauthorize my app for a particular user, basically I like to have a toggle so the user can link or unlink their twitter account to my site, I have the link part working, now just need the unlink part.
Thanks
PS: I got this working for Facebook
Twitter does not allow this through their API.
Read more about this here: http://groups.google.com/group/twitter-development-talk/browse_thread/thread/64a49da760250d9/bfe896c156670692
You would have to have internal functionality which saves id of users which should not be displayed.
You could do the following POST request https://api.twitter.com/oauth2/invalidate_token
to allow a registered application to revoke an issued OAuth 2 Bearer Token by presenting its client credentials. Once a Bearer Token has been invalidated, new creation attempts will yield a different Bearer Token and usage of the invalidated token will no longer be allowed.
It does not revoke the application in the users Apps section (under snettings) but it does have the same effect as re-authenticating the application.
https://dev.twitter.com/oauth/reference/post/oauth2/invalidate/token
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.