I'm currently setting up Facebook Authentication for my Reach Native application. After the usual problems with the react-native-fbsdk setup, now the Facebook App Events work and the LoginManager loads up.
My problem: After Authorisation the LoginManager redirects me back to the app, then shows me the Error:
Login Failed
I'm using the very standard LoginManager implementation:
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 app info in Info.Plist
- iOS Bundle ID in Facebook App
- Client OAuth Settings
- FBSDK LoginButton (same error)
I'm running: iOS 10 & react-native 0.38.0.
Thanks!