I'm trying to authenticate user accounts in Windows Phone. I found this C# library for the job (tweetsharp).
Their example is pretty clear but they use a pin code to authenticate the user.
using TweetSharp;
// Pass your credentials to the service
TwitterService service = new TwitterService("consumerKey", "consumerSecret");
// Step 1 - Retrieve an OAuth Request Token
OAuthRequestToken requestToken = service.GetRequestToken();
// Step 2 - Redirect to the OAuth Authorization URL
Uri uri = service.GetAuthorizationUri(requestToken);
Process.Start(uri.ToString());
// Step 3 - Exchange the Request Token for an Access Token
string verifier = "123456"; // <-- This is input into your application by your user
OAuthAccessToken access = service.GetAccessToken(requestToken, verifier);
// Step 4 - User authenticates using the Access Token
service.AuthenticateWith(access.Token, access.TokenSecret);
IEnumerable<TwitterStatus> mentions = service.ListTweetsMentioningMe();
I was wondering if it's possible to do this without the pincode? I've tried apps that don't ask for the code. Does this mean that tweetsharp is outdated?
Any idea if I can still do the authentication with tweetsharp without using the pin part? Or are there any alternative SDK's out there for windows phone?
Instead of Tweetsharp, you can also make use of Hammock library to access Twitter API. Here is a blog which explains how to implement OAuth for twitter using Hammock.
Hope that helps you.
On TweetSharp page there is also mentioned
xAuth
:Responing to your comment, another option would be using companion web application opened in WebBrowser control in your mobile application, see https://github.com/danielcrenna/tweetsharp#authenticating-a-browser-application