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!
Jonas