Avoid to Authentificate many Times

Mar 15, 2014 at 12:26 AM
Hello ,

I am using linq to twitter for Windows Store application , I would like to know how can I make my user to authentificate only once (only when the app opens for the first time)

Every Time I call method like posting a status I create a new WindowsStoreAuthorizer and a new TwitterContext how can I avoid this ?

Thank you !
Mar 25, 2014 at 6:01 PM

The Credentials property of the Authorizer has the user's tokens, after authorization. So, after the initial authorization, read the tokens from the Credentials and save them in the database. Then check to see if you have tokens for the user the next time you authorize. If you have tokens, populate the authorizer. When the authorizer has all 4 tokens, LINQ to Twitter will allow you to perform queries without authorizing the user again.