I am trying to allow the sign in through Facebook Login but the problem is repeated again and again. Once validated by Facebook the email and password and authorized to see the public information and the user's email, I return to my signin window but does not go through onSuccess.
I think the facebook app I have it well created. I got the KeyHash with the tutorial code, the package is detected in google play, the id is correct ...
The code used is the following:
public class SignInActivity extends AppCompatActivity implements GoogleApiClient.OnConnectionFailedListener, View.OnClickListener {
LoginButton loginButton;
private CallbackManager callbackManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FacebookSdk.sdkInitialize(getApplicationContext());
callbackManager = CallbackManager.Factory.create();
setContentView(R.layout.signinactivity);
loginButton = (LoginButton) findViewById(R.id.login_button);
loginButton.setReadPermissions("email");
loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
Log.d("vfd", "entra onSuccess");
}
@Override
public void onCancel() {
Log.d("vfd", "cancela");
}
@Override
public void onError(FacebookException exception) {
Log.v("LoginActivity", exception.getCause().toString());
}
});
}