FB SDK error: Login failed (with error)

I am currently setting up Facebook authentication for my Reach Native app. After the usual problems with installing response-native-fbsdk, now Facebook applications and LoginManager events work.

My problem: after authorization LoginManager redirects me back to the application and then shows me an error:

Login failed

I use the most standard implementation of LoginManager:

const FBSDK = require('react-native-fbsdk');
const {
  LoginManager,
  AccessToken,
} = FBSDK;


export default class FacebookAuth extends Component {

  facebook(){
    LoginManager.logInWithReadPermissions(['public_profile', 'email']).then(
  function(result) {
    if (result.isCancelled) {
      alert('Login cancelled');
    } else {
      alert('Login success with permissions: '
        +result.grantedPermissions.toString());
    }
  },
  function(error) {
    alert('Login fail with error: ' + error);
  }
);

Do you have any pointers for me?

I already checked:

  • FB Application Information in Info.Plist
  • The identifier of the iOS package in the application for Facebook.
  • OAuth Client Settings
  • FBSDK LoginButton (same error)

I run: iOS 10 and action-native 0.38.0.

Thank!

+12
3

Facebook SDK - React Native

, Facebook SDK , , , , , , logOut LoginManager.

LoginManager.logInWithReadPermissions...

LoginManager.logOut();
+23

, 4.39.0 4.38.0 . , .

0
-1

Source: https://habr.com/ru/post/1662662/


All Articles