It turns out that I am developing an application using Xamarin for Android consumption and well, the problem is when I want to authenticate my app with Facebook, I followed this tutorial (I used the Xamarin.Auth package) link but I got the following error:
You did not sign in: You did not sign in. Sign in and try again.
Later I continued searching the Internet and now I have the following:
The parameter app_id is required
These are the methods I used for the request
private void FacebookLogin(object sender, System.EventArgs e)
{
var autorizacion = new OAuth2Authenticator(
clientId: "1933406530283189",
scope: "",
authorizeUrl: new Uri("https://m.facebook.com/dialog/oauth?"),
redirectUrl: new Uri("http://www.facebook.com/connect/login_success.html#"));
autorizacion.Completed += FacebookAuth_Completed;
var ui = autorizacion.GetUI(this);
StartActivity(ui);
}
private async void FacebookAuth_Completed(object sender, AuthenticatorCompletedEventArgs e)
{
if (e.IsAuthenticated)
{
var solicitud = new OAuth2Request(
"GET",
new Uri("https://graph.facebook.com/me?fields=name,birthday"),
null,
e.Account
);
var respuestafacebook = await solicitud.GetResponseAsync();
var fbJson = respuestafacebook.GetResponseText();
var fbUser = JsonConvert.DeserializeObject<Cuenta>(fbJson);
// var nombre = fbUser.Nombre;
// var id = fbUser.Id;
}
}
PD. I have already been able to access but is stunned in this part:
var answerfacebook = await request.GetResponseAsync ();