Getting Exception while calling the StartActivity from the main activity file in xamarin android

VijayKumar.0628VijayKumar.0628 USMember ✭✭
edited July 2017 in Xamarin.Android

Hi All,

I am trying to implement Facebook and Twitter login in Xamarin android for my application. While calling the StartActivity() method to present the Facebook and twitter UI for the user authentication. I am getting the exception as shown in the attached image. Please find my code below in MainActivity.cs.

public void FacebookLogin()
{
var auth = new OAuth2Authenticator(
clientId: "ClientId",
scope: "",
authorizeUrl: new Uri("https://m.facebook.com/dialog/oauth/"),
redirectUrl: new Uri("http://www.facebook.com/connect/login_success.html"));
auth.AllowCancel = true;
auth.Completed += FacebookAuth_Completed;
StartActivity(auth.GetUI(this));
}

Please let me know how to resolve this.

Thanks,
Vijayakumar Y.

Answers

Sign In or Register to comment.