小编Rin*_*haj的帖子

react-native loginwithpermissions promise not resolved on android

After upgrading a react-native from 0.56 to 0.59.8 (using FBSDK 0.10.1), the facebook login don't work anymore on android.

when I fill the Fb login form and continue, LoginManager.logInWithPermissions promise does not resolve and never goes to .then() after logInWithPermissions()

here is my code:

loginWithFBSDKLoginManager() {
    LoginManager.logOut();
    const self = this;
    return new Promise((resolve, reject) => {
      LoginManager.logInWithPermissions(['public_profile', 'email']).then(function (result) {
        if (result.isCancelled) {
          return;
        }
        AccessToken.getCurrentAccessToken().then((data) => {
          const accessToken = data.accessToken.toString();
          const userID = data.userID.toString();
          self
            .getUserInfos(accessToken)
            .then((response) …
Run Code Online (Sandbox Code Playgroud)

javascript android react-native react-native-fbsdk

5
推荐指数
1
解决办法
733
查看次数