Im having the following problem connecting to Twitter using OAuth PIN authorizer method.
The Code:
private async void button1_Click(object sender, RoutedEventArgs e)
{
pinAuth = new PinAuthorizer
{
CredentialStore = new InMemoryCredentialStore
{
ConsumerKey = resourceLoader.GetString("ConsumerKey"),
ConsumerSecret = resourceLoader.GetString("ConsumerSecret")
},
GoToTwitterAuthorization = async pageLink =>
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal,
() =>{ OAuthWebBrowser.Navigate(new Uri(pageLink, UriKind.Absolute)); })
};
await pinAuth.BeginAuthorizeAsync();
After retrieving the PIN I would do something like that:
private async void button2_Click(object sender, RoutedEventArgs e)
{
string pin = null; // Cant get the PIN
await pinAuth.CompleteAuthorizeAsync(pin);
var credentials = pinAuth.CredentialStore;
string oauthToken = credentials.OAuthToken;
string oauthTokenSecret = credentials.OAuthTokenSecret;
string screenName = credentials.ScreenName;
ulong userID = credentials.UserID;
}
The browser opens I put my credentials into the form and click authorize. After this click the PIN pops up for half a second and then the following error message appears: "This page requires some information that was not provided. Please return to the site that sent you to this page and try again... it was probably an honest mistake"
Same problem in this Thread without solution so far.
Thank you!
//UPDATE