Facebook requestCodes

前端 未结 7 745
予麋鹿
予麋鹿 2021-02-02 11:26

I have an Activity that should handle results from both the Facebook SDK, and from other custom Activities.

Where can I find the requestCodes used by the Facebook SDK, i

相关标签:
7条回答
  • 2021-02-02 12:28

    in the lates sdk, (4.4.1), you can manually set the request code by modifying two files in the facebook library: 1) LoginClient.java

     public static int getLoginRequestCode() {
        //return CallbackManagerImpl.RequestCodeOffset.Login.toRequestCode();
        return [your request code here];
    }
    

    2)LoginManager.java

     public void registerCallback(
         ...
        ((CallbackManagerImpl) callbackManager).registerCallback([your request code here],
                new CallbackManagerImpl.Callback() {
                    @Override
                ...
                }
        );
    }
    
    0 讨论(0)
提交回复
热议问题