Please provide the following:
- SDK Version: 35
- Platforms(Android/iOS/web/all): iOS (non-ejected)
After redirecting back from Facebook (successful authorization) I get the following error from the Expo SDK:
FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized
My login code:
import * as Facebook from 'expo-facebook'
try {
const fbAccess = await Facebook.logInWithReadPermissionsAsync('xxxxxxxxxxxx', {
permissions: ['public_profile', 'email']
});
if (fbAccess.type === 'success') {
alert('OK!')
} else {
alert('You cancelled login, maybe try phone login?')
}
} catch (err) {
alert(`Facebook Login Error: ${JSON.stringify(err)}, maybe try login by phone?`);
}
This happens consistently with the Native App login. I have been looking for a while but can’t figure out what I am doing wrong…
I should precise that this error only happens when using the native app to login. Login through the webview works fine.