Login Facebook


I'm trying to get my app use the login facebook else is returning ever "expected access_token in response but did not receive one."

Already looking at several forums and resolves nothing.
Most speak that can be error in redirectUrl but redirectUrl is correct, even reaches redirect.

Another point would not desire to accomplish redirection, I would like to remain in the app.

Does anyone know what may be the error reason?

protected override void OnCreate (Bundle bundle)
base.OnCreate (bundle);

      SetContentView (Resource.Layout.Login);

      btnLoginFace = FindViewById<View>(Resource.Id.vie_login_retanguloazul);
      btnLoginFace.Click += delegate
          auth = new OAuth2Authenticator(
              clientId: AppId,
              scope: "id,first_name,last_name,locale",
              authorizeUrl: new Uri("https://m.facebook.com/dialog/oauth/"),
              redirectUrl: new Uri("http://xxx.xx"));
          auth.Completed += auth_Completed;

  void auth_Completed(object sender, AuthenticatorCompletedEventArgs e)
      if (e.Account != null)
          userToken = e.Account.Properties["XXXXXXXXXXX"];
          AccountStore.Create(this).Save(e.Account, "XXXXX");


  • I discovered the error reason mentioned above.
    I was using the scope permissions not assigned to the app on facebook.

    Now the problem is on the line below

    userToken = e.Account.Properties["XXXXXXXXXXX"];

    I will find the bug problem.

Sign In or Register to comment.