I have the following c# code for windows phone 8.1 to authenticate user login via twitter.
openTwitterPage is the Button event when user clicks login on the home page.
After the user enter his login credentials on twitter page and clicks sign in, my homepage is shown again and the Frame.Navigate code is never executed.
private async void openTwitterPage(object sender, RoutedEventArgs e)
{
await Authenticate();
this.Frame.Navigate(typeof(MainMenu));
}
private async System.Threading.Tasks.Task Authenticate()
{
user = await App.MobileService.LoginAsync(MobileServiceAuthenticationProvider.Twitter);
}
I had troubles using MobileServiceAuthenticationProvider too so I wrote my own library to authenticate users with Twitter client-side on Windows Phone 8.1. Take a look - https://github.com/konradbartecki/TwitterAutherino
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.