tags:

views:

25

answers:

1

I am writing an app using WPF 3.5 and I need twitter integration.

I know that there are many API's for C# and most of them seem to be on the right track.

But one, painfully annoying (seemingly 100% required) step of the twitter posting is that you need to redirect the user to the twitter website, in which they need to login and click "allow" which then shows a PIN number which the user must enter in to my client app in order to simply tweet.

This is so cumbersome and annoying for each run of the app, I dont mind a once off thing, but each time?? Am I not doing this right, why isnt it just a once off allowance of a registered app? How do apps like TweetDeck do it so that they dont have to re-approve each time I load the app?

+1  A: 

You need to store the token and the key provided by the server when you perform the OAuth authentication. You can continue to sign your requests using those keys. I'm not entirely sure which library you're using, which makes it hard to say, but there should be a means of retrieving the key/token that Twitter provides you with and passing this back in as a means of authentication.

One other alternative is to use xAuth, which makes it a little easier for your app to authenticate the user. The downside is that it's pretty oblique and might not be supported by the library you're using.

Good luck!

mattbasta
Yep, thanks, like my comment also suggested, storing the keys and tokens is the way to go here. Its a once off step, which is a bit of a pain, but worth the security
Mark