2015年8月19日 星期三

facebok android 4.0.0 loginbutton loginmaster callback stranger bug

no matter use login master or login button to register login callback;
only loginButton.registerCallback can be work
 loginButton.registerCallback(callbackManager, new FacebookCallback() {
            @Override            public void onSuccess(LoginResult loginResult) {
            }

            @Override            public void onCancel() {

            }

            @Override            public void onError(FacebookException e) {

            }
        });

facebook graph api use new request to avoid strange problem

Bundle parameters = new Bundle();parameters.putString("fields", "id,name");GraphRequest request = new GraphRequest(AccessToken.getCurrentAccessToken(), "me/accounts", parameters, null, new GraphRequest.Callback() {
    @Override    public void onCompleted(GraphResponse graphResponse) {

    }
});