Is there anyway to get already authenticated user id without redirecting to authenticate APP?


I have an application which post on twitter while user(anonymous user too) commenting on twitter.Once the user authenticate the app i am storing his acceess token and secret.If he visit next time and comment i need to get his twitter id to search in my db for his tocken.Is there anyway for doing the same without redirecting him again to athenticate page and redirect back(or a popup).(something like to get twitter logedin already authenticated user info without showing him twitter login screen).


Once you receive the access token, it’s up to you to persist it – that might mean you have a login system on your site, and you’ve associated that access token with their login information. If you don’t have a login system on your site, then your ability to identify the end user is a bit more temporal. While you would never want to store an access token and access token secret in a session cookie, you might want to use it as a pointer to where to find it for the “current user” in your database.

If you don’t have any kind of persistence layer on your side, you’re going to have to use the OAuth flow to re-negotiate and identify the token each time.