//Use your consumerKey and ConsumerSecret
private async void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
if (string.IsNullOrEmpty(pinText.Text))
{
var msgDialog = new MessageDialog("Please Enter the pin showed below");
await msgDialog.ShowAsync();
}
else
{
var pinCode = pinText.Text.Trim();
var userCredentials = AuthFlow.CreateCredentialsFromVerifierCode(pinCode, authenticationContext);
Auth.SetCredentials(userCredentials);
var vault = new PasswordVault();
vault.Add(new PasswordCredential("Friend", "TwitterAccessToken", userCredentials.AccessToken));
vault.Add(new PasswordCredential("Friend", "TwitterAccessTokenSecret", userCredentials.AccessTokenSecret));
var localSettings = ApplicationData.Current.LocalSettings;
var frame = Window.Current.Content as Frame;
if (localSettings.Values.ContainsKey("FirstTimeRunComplete"))
{
frame?.Navigate(typeof(MainPage));
}
else
{
frame?.Navigate(typeof(FirstTimeTutorial));
}
}
}