I have a problem with implementing twitter login in my Xamarin Android. I have included Xamarin.Auth component and it works fine for Facebook. Fot twitter auth.Completed event is not called... I have created sample app on twitter dev portal.
Here is my code from the app:
private void LoginTwitter()
{
var auth = new OAuth1Authenticator(
consumerKey: "3v7rOXkdexGYhQmr3HVhtGgPO",
consumerSecret: "mGhRjee87tAp4X0vHUmMIohWoYy0JGg9zFGyin7CigFP64y3j5",
requestTokenUrl: new Uri("https://api.twitter.com/oauth/request_token"),
authorizeUrl: new Uri("https://api.twitter.com/oauth/authorize"),
accessTokenUrl: new Uri("https://api.twitter.com/oauth/access_token"),
callbackUrl: new Uri("http://twitter.com")
);
auth.AllowCancel = true;
StartActivity(auth.GetUI(this));
auth.Completed += (s, eventArgs) =>
{
if (eventArgs.IsAuthenticated)
{
Account loggedInAccount = eventArgs.Account;
//save the account data for a later session, according to Twitter docs, this doesn't expire
AccountStore.Create(this).Save(loggedInAccount, "Twitter");
}
};
}
I hope someone will help.