Created
October 11, 2017 14:59
-
-
Save denisviana/6c46c08f9ec55fed9932b2162e5cc0fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fbLoginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() { | |
@Override | |
public void onSuccess(LoginResult loginResult) { | |
GraphRequest request = GraphRequest.newMeRequest( | |
loginResult.getAccessToken(), | |
(object, response) -> { | |
navigationController.navigateToRegister(BeforeHomeActivity.this,response.getJSONObject()); | |
finish(); | |
}); | |
FirebaseCrash.log("Success Facebook"); | |
Bundle parameters = new Bundle(); | |
parameters.putString("fields", "id,name,email,gender, birthday"); | |
request.setParameters(parameters); | |
request.executeAsync(); | |
} | |
@Override | |
public void onCancel() { | |
} | |
@Override | |
public void onError(FacebookException error) { | |
FirebaseCrash.log(error.toString()); | |
} | |
}); | |
fbLoginButton.performClick(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment