Home React Native Facebook Login wouldn't redirect back to app in iOS
Reply: 0

React Native Facebook Login wouldn't redirect back to app in iOS

sleepwalkerfx
1#
sleepwalkerfx Published in 2017-12-07 19:13:48Z

I'm having an issue with react native facebook login. Android version works perfectly, but iOS version won't redirect back to app once authenticated via Facebook app. Probably this is not something wrong with the code but something wrong with App settings in facebook's dev portal. How to redirect back to iOS app once authenticated via Facebook native app ?

My code,

  facebookLogin() {
    const { fbLoginRequest } = this.props;
    LoginManager.logInWithReadPermissions(['public_profile', 'email', 'user_birthday'])
      .then(result => {
        if (!result.isCancelled) {
          AccessToken.getCurrentAccessToken().then(data => {
            fbLoginRequest({ token: data.accessToken.toString() });
            console.log(data.accessToken.toString());
          });
        }
      }, error => {
        console.log('An error occurred: ', error);
        toast.negative(error);
      }).catch((error) => {
        console.log(error);
        toast.negative(error);
      });
  }
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.306045 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO