Avoiding Authentication again and again

Mar 30, 2014 at 12:28 PM
Edited Mar 30, 2014 at 12:30 PM
Hey, I want to store the authentication credentials into LocalSettings, but the problem is that when I authenticate and save the credentials, when I try to load it like this, it does not post anything. Can you please help?
WindowsStoreAuthorizer auth = new WindowsStoreAuthorizer
                {
                    CredentialStore = new InMemoryCredentialStore
                    {
                        ConsumerKey = "K8g2PoCj3ceRNav64ig",
                        ConsumerSecret = "8SlUKNVgkRIzhroQnCmogULZko81QAJTScZPPQuE",
                        OAuthToken = (string)ApplicationData.Current.LocalSettings.Values["oauthToken"],
                        OAuthTokenSecret = (string)ApplicationData.Current.LocalSettings.Values["oauthTokenSecret"],
                        ScreenName = (string)ApplicationData.Current.LocalSettings.Values["screenName"],
                        UserID = (ulong)ApplicationData.Current.LocalSettings.Values["userID"],
                    }
                };
                await auth.AuthorizeAsync();
                
                twitterCtx = new TwitterContext( auth );
                ApplicationData.Current.LocalSettings.Values.Remove( "Tweet" );
                await twitterCtx.TweetAsync( "Hello From Background!" );
Coordinator
Mar 30, 2014 at 4:05 PM