I want to get the profile details from Facebook. I am using the latest Facebook SDK. I want to use custom login button to login and get profile details of user.
In onSuccess method i am getting LoginSuccess object . Now i am stuck how i got user profile data . And this code is on facebookButton not on custom button. Please give me some ideas to integrate the SDK via custom button. I go through the facebook documentation but do not got anything useful.
callbackManager = CallbackManager.Factory.create();
LoginManager.getInstance().registerCallback(callbackManager,
new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
// App code
}
@Override
public void onCancel() {
// App code
}
@Override
public void onError(FacebookException exception) {
// App code
}
}
);