Using oAuth i can able to sucessfully login and forward it back to my asp.net application.
how can i get the username of the authenticated person. At this point i just have an authenticated oAuth.
Using oAuth i can able to sucessfully login and forward it back to my asp.net application.
how can i get the username of the authenticated person. At this point i just have an authenticated oAuth.
The verify_credentials API request will return information about the currently logged in user.
Also, Twitter's response to an OAuth access token request (i.e. the last part of the OAuth login procedure) responds with the user's screen name and Twitter user ID alongside the usual oauth token and secret.
Using Twitterizer library, here is a code snippet.
OAuthTokenResponse reqToken = OAuthUtility.GetAccessToken(ConsumerKey, ConsumerSecret, requestToken);
long UserID = reqToken.UserId;
string ScreenName = reqToken.ScreenName;
I've posted a sample code on my blog. http://www.fairnet.com/post/2010/09/05/Twitter-authentication-using-OAuth.aspx