2
votes

I have a problem with my mobile app The problems is with the facebook login, but only in IOS It already works in android (even in production) Instead in IOS does not work in production, it only works in the XCODE emulator

My app.json looks like this:

{


"expo": {
   "name": "MyUniqueName",
   "facebookScheme":"fbMyFbAppId",
   "facebookAppId":"MyFbAppId",
   "facebookDisplayName":"MyUniqueName",
   "description": "This project is really great.",
   "slug": "MyUniqueName",
   "privacy": "public",
   "sdkVersion": "30.0.0",
   "platforms": ["ios", "android"],
   "version": "1.0.1",
   "orientation": "portrait",
   "icon": "./assets/favicon.png",
   "splash": {
     "image": "./assets/splash.png",
     "resizeMode": "cover",
   },
   "updates": {
     "fallbackToCacheTimeout": 0
   },
   "assetBundlePatterns": [
     "**/*"
   ],
   "ios": {
     "supportsTablet": true,
     "bundleIdentifier": "com.myCompany.myCompany",
     "infoPlist": {
       "LSApplicationQueriesSchemes": [
         "fbapi","fb-messenger-share-api","fbauth2","fbshareextension"
       ]
     }
   },
   "android": {
     "versionCode": 2,
     "package": "com.myCompany.myCompany"
   },
 }
}

My facebook console: console facebook

I printed the error but only I get this: app screenshot

1

1 Answers

3
votes

I hope you are using Facebook.logInWithReadPermissionsAsync. If so,

Add behavior: 'web' as below.

It worked for me in Expo client and production as well.

Facebook.logInWithReadPermissionsAsync(Config.loginSetup.facebookID, 
 { 
 permissions: ['public_profile','email'],
 behavior: 'web'
 })