Authorizing Twitter user

Jul 2, 2014 at 11:15 AM
Edited Jul 3, 2014 at 6:41 AM

I’m new to this so forgive me if this is a stupid question:

I’m making an ASP.NET application that posts tweets on behalf of the user.
This works fine, but if I save the access tokens and consumer keys – to avoid the authorization procedure, and a different Twitter user is logged in on my computer, the user that authorized the access in the first place gets the tweet (as I would expect)…

Two Twitter users share a computer and play an online game that tweets high scores. User A is logged into Twitter and authorizes the game to tweet on his behalf. Later user B logs into Twitter on the same computer and play the same game.
The game stored user A’s access tokens and uses these to log into Twitter, user B’s high score will be posted on user A’s Twitter account.

Is there any way to check that the Twitter user that authorized the access is indeed the Twitter user that is currently logged in on the computer?
Jul 7, 2014 at 11:16 PM
I am not sure I followed what you are trying to do.
But you can know which user is associated with a specific set of credentials.
TwitterCredentials.SetCredentials(// set of credentials);
var loggedUser = User.GetLoggedUser();
Kind Regards,