Expo CLI 2.6.5 environment info:
System:
OS: macOS High Sierra 10.13.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.10.0 - /usr/local/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
expo: ^30.0.1 => 30.0.1
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4
react-navigation: ^2.16.0 => 2.16.0
npmGlobalPackages:
expo-cli: 2.6.5
iOS
It should be possible for a user to log in or sign up via Facebook
If I use Expo app to test my app before deploying (expo build:ios), I can sign in through Facebook. Once I press the Facebook login button, a page appears so that I can enter my facebook ID and password and I receive the token to use Firebase Auth. The problem is that when I deployed the app, downloaded it through TestFlight, and pressed the Facebook login button, nothing shows up.
Code:
const { type, token } = await Expo.Facebook.logInWithReadPermissionsAsync(someNumber, { permissions: ['public_profile', 'email']});
if (type === 'success') {
const credential = firebase.auth.FacebookAuthProvider.credential(token);
firebase.auth().signInAndRetrieveDataWithCredential(credential)
.then((user) => {
// some codes
}).catch((err) => {
// somecodes
})
}
It does not make any problem on Expo.
same environment, same problem
Hi, can someone provide a full repro to this (ideally a snack) that we can copy + paste and build a standalone app with? So far we've been unable to reproduce this issue, and having an easy repro case would be a big help in getting this resolved quickly. Thanks!
I’m running into the same issue. Facebook auth works from Expo but when I generate an app and send it to Apple, the Test Flight version of the app doesn’t work. Oddly enough, it doesn’t work on my iPhone XS or my iPhone 8, but it does work properly on my iPhone 5s and iPhone SE with iOS 12.1.1.
I get right up to
let { type, token } = await Facebook.logInWithReadPermissionsAsync('[App ID Removed]', {
permissions: ['public_profile', 'email']
})
And that’s where the code stops running on the 8 and XS. But again, runs just fine on an iPhone 5s and iPhone SE after downloading from Test Flight. Apps I've already built are still working correctly, but any new app I build that includes the above line of code fails on the XS and 8 but not the 5s or SE.
Hi there. I just would like to say that I could overcome this issue by upgrading from v30 to v31 without changing any code.
exactly same issue here on iphone7 - works fine on Simulator and Expo but stops dead in Testflight. I'm on sdk v 31. app.json below:
"expo": {
"name": "client_expo",
"slug": "client_expo",
"privacy": "public",
"sdkVersion": "31.0.0",
"platforms": ["ios", "android"],
"version": "0.1.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#000000"
},
Same problem, facebooklogin works fine in simulator but I build ios and thrown away to testflight, facebooklogin wont work pressed the Facebook login button, nothing shows up.
I use expo sdk 30 , I tested my iphone 6 12.0.1 device
My code is below
const doFacebookLogin = async dispatch => {
let { type, token } = await Facebook.logInWithReadPermissionsAsync(
'App Id',
{
permissions: ['public_profile']
}
);
if (type === 'cancel') {
return dispatch({ type: FACEBOOK_LOGIN_FAIL });
}
await AsyncStorage.setItem('fb_token', token);
dispatch({ type: FACEBOOK_LOGIN_SUCCESS, payload: token });
};
Hi, can someone provide a full repro to this (ideally a snack) that we can copy + paste and build a standalone app with? So far we've been unable to reproduce this issue, and having an easy repro case would be a big help in getting this resolved quickly. Thanks!
You can test this @esamelson , having the same issue. Working fine until Testflight, where nothing happens when clicking the button.
https://snack.expo.io/BkFJ9ibZE
Also added: "facebookAppId", "facebookScheme" & "facebookDisplayName" in app.json.
Same for me,
I tried with expo v30 and v31 and it didn't fix the issue
Same.
I was also using logInWithReadPermissionsAsync and nothing happens on iOS when i press the login button.
Hm… 🤔 I've just created a Turtle-built app on SDK32 with App.js
code similar to https://snack.expo.io/BkFJ9ibZE. My app.json
looks like:
{
"expo": {
"name": "sdk32-facebook-login-ios",
"slug": "sdk32-facebook-login-ios",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [ /* ... */ ],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": { /* ... */ },
"updates": { /* ... */ },
"assetBundlePatterns": { /* ... */ },
"facebookAppId": "629712900716487",
"facebookDisplayName": "expotest",
"facebookScheme": "fb629712900716487",
"android": {
"package": "test.sjchmiela.sdk32facebooklogin"
},
"ios": {
"buildNumber": "2",
"supportsTablet": true,
"bundleIdentifier": "test.sjchmiela.sdk32facebooklogin",
"infoPlist": {
"LSApplicationQueriesSchemes": ["fbapi", "fb-messenger-share-api", "fbauth2", "fbshareextension"]
}
}
}
}
…and logging in succeeds, alerting proper username. 😱 I think adding the LSApplicationQueriesSchemes
may be pretty non-standard, so I'll check again without this property and see if I'm able to reproduce this issue.
Even without LSApplicationQueriesSchemes
, authentication still works. Could you please try reproducing the issue on SDK32? Maybe it has been fixed (since SDK31 Facebook SDK has been upgraded to 4.38.1). 🙂
Just updated the expo version to v32 and it's working on dev mode on expo like before but not on publish mode on the real app.
I added everything LSApplicationQueriesSchemes
with the full array and nothing worked.
It goes directly on the catch in the facebook login.
Thanks, @harrymelka!
async loginWithFacebook(): Promise<void> {
try {
// Real
const { type, token } = await Facebook.logInWithReadPermissionsAsync('TOKEN', { permissions: ["public_profile", "email"], behavior: "web" }
);
switch (type) {
case "success": {
// Get the user's name using Facebook's Graph API
const response = await fetch(`https://graph.facebook.com/me?access_token=${token}&fields=email,id,name,picture.type(large),gender,friends`);
const profile = await response.json();
const credential = firebase.auth.FacebookAuthProvider.credential(token);
// Sign in with credential from the Facebook user.
firebase.auth().signInWithCredential(credential).then((result) => {
.........
}).catch((error) => {
console.log(error);
})
}).catch((error) => {
// Handle Errors here.
console.log(error);
});
break;
}
case "cancel": {
Alert.alert(
"Annulé!",
"Connexion Annulée",
);
break;
}
default: {
Alert.alert(
"Oops!",
"Erreur Connexion! 1",
);
}
}
} catch (e) {
Alert.alert(
"Oops!",
"La connexion a échoué avec Facebook! Nous allons l'examiner. Merci de créer un compte.",
);
console.log(e.message);
}
}
I tried it on iPhone 8, 8+, X, XsMax with ios 12 mostly previous and newest versions.
{
"expo": {
....
"sdkVersion": "32.0.0",
"platforms": [
"ios",
"android"
],
"facebookScheme": "fb.....",
"facebookAppId": ".....",
"ios": {
"bundleIdentifier": "...",
"infoPlist": {
"NSCameraUsageDescription": "L'application a besoin de la permission pour pouvoir scanner les codes barre.",
"NSLocationWhenInUseUsageDescription": "L'application a besoin de la permission pour pouvoir vous aider à trouver les commerces proche de vous.",
"LSApplicationQueriesSchemes": [
"waze",
"fbapi",
"fb-messenger-share-api",
"fbauth2",
"fbshareextension"
]
}
}
}
}
{
"name": "my-project",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/samples": "2.1.1",
"@expo/vector-icons": "^8.0.0",
"expo": "^32.0.0",
....
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
.....
"yarn": "^1.12.3"
},
"devDependencies": {
"jest-expo": "32.0.0"
}
}
Here is what I have on the app, the versions and configs
If you have any ideas, I tried a lot of stuff. My facebook configs work perfectly on another app that use expo but the version is v29 so it's really in facebook expo login.
Thank you
I am having the same problem on expo 30. It's not working on iPhone 8 but it is working on iPhone SE.
Did anyone managed to get it working without upgrading? Or checked if the login works on testflight with AuthSession instead of Facebook.logInWithReadPermissionsAsync ?
Did anyone manage to fix this? We really need this feature for our app to work!
It's working for me after upgrading from v30 to v31. I did have to change a single line of code, I had to explicitly say I wanted to use Facebook browser auth, but other than that it worked fine after an SDK upgrade.
Can't upgrade to v31 sadly due to https://github.com/expo/expo/issues/3189
Trying out setting the behaviour to 'web'
I've upgraded the expo SDK to 32 according to https://docs.expo.io/versions/latest/workflow/upgrading-expo-sdk-walkthrough and it solved the problem!!!! thanks @sjchmiela !
This sounds a little bit too good to be true… 😅 (Although… we did upgrade FBSDK in Expo SDK 32 to 4.38.1… 🤔).
It looks like react-native-facebook-login
may suffer from similar problem — https://github.com/magus/react-native-facebook-login/issues/330.
Has anyone else been able to fix the issue by upgrading too?
Same issue with v30
And i got some issues when upgrading to v31 or v32 for now (v32 full white screen and nothing happend except http request spamming, and v31 react-native-maps-directions issue, nice one too)
So couldn't try this "fix"
Anyone for another solution in v30 for now?
i managed to make it work in expo v30 with AuthSession
let result = await AuthSession.startAsync({
authUrl: facebookAuthUrl + '&redirect_uri=' + redirectUrl + '&response_type=token'
})
What is facebookAuthUrl
I upgrade expo v30 to v32 then works thanks
@hughbe you can get the authUrl from facebook documentation
It was not so easy, but upgrading to v32 fixed the issue too
Interesting… 🤔 Is there anyone for whom upgrading to SDK32 didn't help solve the issue?
@sjchmiela Im on SDK32 and its not working on testflight. In simulator I get an alert saying "Expo wants to use Facebook to sign in" but its never showing on testflight so I can't proceed.
So I updated again to V32 and it fix the issue but I had to send the app again to apple and not publish with expo. I had to uninstall the app and reinstall it on my phone for it to work.
Hope it helps
@sjchmiela I'm on SDK 32, and I'm using AuthSession
from expo to login with Auth0. Same issue as everyone else is describing. Everything works fine while testing on the simulator and actual device. Just deployed to TestFlight and nothing happens when I try to log in now. This is my first time using expo, so I'm not entirely sure how to debug from here, but I'm happy to provide whatever you need.
Edit: I put some alerts into it and re-deployed with TestFlight, everything works fine until AuthSession.startAsync
I couldn't get this to work for ages on Testflight even though working perfect on Expo client but then re-read all of the documents to make sure I had things correct. It turned out that where I had confused myself was that I had set up Auth for Expo client BUT when you build the expo client for testflight you are building a standalone app. This may be obvious to a lot of you on here but as a first timer I really hadn't grasped that.
So.. after I followed the instructions for getting my facebook scheme ID etc then reading further instructions to try to work out where to put things in my app.json, I ended up with the below. Works perfect for both my google log in and Facebook (i'm only testing ios builds). Oh, and I made sure that I had upgraded to v32.
Hope this helps some of you - I was stuck for two weeks! Grrrrr.
{
"expo": {
"name": "myApp",
"description": "myApp description!",
"slug": "myApp",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": ["ios", "android"],
"version": "0.0.8",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#000000"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"facebookScheme": "fbxxxxxxx",
"facebookAppId": "xxxxxxxxx",
"facebookDisplayName": "myApp",
"ios": {
"supportsTablet": true,
"bundleIdentifier": "xxxxxxxxx",
"config": {
"googleSignIn": {
"reservedClientId": "xxxxxxxxxx"
}
},
"icon": "./assets/images/icon.png",
"infoPlist": {
"NSCameraUsageDescription": "App needs permission to access your photos to set your venue photo.",
"NSLocationWhenInUseUsageDescription": "App uses your location to show remote working venues near to you.",
"LSApplicationQueriesSchemes": [
"fbapi",
"fb-messenger-share-api",
"fbauth2",
"fbshareextension"
]
}
}
}
}
Can anyone not on SDK 32 say if the previous app.json solution worked?
We can't upgrade to SDK 32 because it broke some stuff with postMessage inside WebViews.
I got this working after adding what GBGituser did plus switching login behavior from 'web' to default.
@nickjuntilla @GBGitUser Do you mind sharing what's different, or perhaps, what I need to add?
Thanks!
{
"expo": {
"name": "APP NAME",
"description": "APP DESCRIPTION",
"slug": "APP SLUP",
"privacy": "public",
"sdkVersion": "32.0.0",
"ios": {
"bundleIdentifier": "com.IDENTIFIER",
"supportsTablet": true
},
"android": {
"package": "com.IDENTIFIER"
},
"platforms": [
"ios",
"android"
],
"version": "0.0.2",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
]
}
}
@cmaronchick Switch
Expo.Facebook.logInWithReadPermissionsAsync(
social.fb_app_id,
{
permissions: ['public_profile', 'email'],
behavior: 'web'
}
);
to:
Expo.Facebook.logInWithReadPermissionsAsync(
social.fb_app_id,
{
permissions: ['public_profile', 'email']
}
);
That's what I had to do. That triggers the default facebook login behavior. After that you will probably need to add
"facebookScheme": "...",
"facebookAppId": "...",
"facebookDisplayName": "...",
Properties to your app.json file and you may need to submit new builds to the app store as well.
Thanks! It just occurred to me that I'm using AuthSession rather than Expo.Facebook, so I don't think that we're talking about the same thing, right?
I have the same problem, I just need to get the facebookScheme, I downloaded of firebase info.plist file and put it in the root of the project. How can I get facebookScheme, through xCode, is provided by firebase??
Ok, I have this fixed. Your Facebook scheme is fb preceding your Facebook App ID.
The fix is to add 'scheme': 'com.DOMAIN' to the app.json file, and that should do it.
Simple as that?
That's what got it working for me. YMMV.
I have upgraded expo and It's still not working with expo version 32.0.0 and 32.0.2. I didn't try other versions because there is no mention about this fix on Changelog.
@ctur Can you share any more information?
@cmaronchick Sure,
Using default 'system' to login fb.
Expo.Facebook.logInWithReadPermissionsAsync( social.fb_app_id, { permissions: ['public_profile', 'email'] } );
and my app.json is exact same with @GBGitUser. Facebook scheme is Facebook ID preceding 'fb'. Upgraded expo, react native and react exactly as documentation mentioned.
@cmaronchick i don't really understand your fix 'scheme':com.DOMAIN, what is DOMAIN? I didn't find connection between Scheme option and Facebook on any documentation at all.
Also i am not using Firebase or something else. FB Login working both on DEV and Production also on Play Store version as expected for Android. But not working on Testflight.
Hi @ctur, Ok, I wasn't able to utilize Expo.Facebook, so I can't advise you on that.
Regarding DOMAIN, I used the same value as bundleIdentifier for Android and iOS in the Scheme value. Hope that that's helpful.
Problem is related to login behavior, using 'system' (default) behavior for both Android and IOS but it is not working on IOS. I have changed to 'web' behavior and it's working with web but still not working on 'system' - default behavior. Which is not a fix at all.
Also i have added this to infoPlist - app.json (not sure if it's correct way)
"NSAppTransportSecurity": {
"NSExceptionDomains": {
"facebook.com": {
"NSIncludesSubdomains": true,
"NSExceptionRequiresForwardSecrecy": false
},
"fbcdn.net": {
"NSIncludesSubdomains": true,
"NSExceptionRequiresForwardSecrecy": false
}
}
}
Congrats @ctur!
I have fixed my problem for 'system' - default behavior. It was related to my navigator styling. Facebook Login screen was openning but it was appearing behind the app. I can now confirm that everything working properly with Expo version 32 with @GBGitUser app.json settings.
Hi everyone,
I've read all the answers above and tried to do some fixing myself. I've found out that when I change the default behavior, everything works fine. Is this the 'right' way to do so? I am using Expo SDK version 32 with @GBGitUser app.json settings aswell.
One more thing I didn't get the part about setting the 'bundleIdentifier' in app.json.
const {type,token} = await Expo.Facebook.logInWithReadPermissionsAsync('<APP_ID>', {permissions: ['public_profile','email']});
to
const {type,token} = await Expo.Facebook.logInWithReadPermissionsAsync('<APP_ID>', {permissions: ['public_profile','email'], behavior: "web"});
Thank you.
Hello @ekinalcar, not sure what do you mean about right but i would say it looks good, https://docs.expo.io/versions/latest/sdk/facebook/, as mentioned on docs, it 'Attempts to log in through the Facebook account currently signed in through the device Settings', on iOS 11+ fallback to native behavior which attempts to login through native Facebook App, otherwise fallback to browser which opens browser to login.
hi @ctur thank you for your quick reply. the problem is when I set the behavior to 'native' after the facebook login , the screen won't switch back to my app. here is the process described with screenshots. only a blank page shows at the end of the process. I actually don't want to use the 'web' behavior.Pop ups can be annoying.
Hope I made myself clear :/
Did you add host.exp.Exponent
as mentioned here https://docs.expo.io/versions/latest/sdk/facebook/ to your iOS Bundle Id on Facebook developer portal? and also you should add your bundle id to app.json inside project.
@ctur
yes I've added the iOS bundle id as mentioned in the dev portal and in the app.json file
Could you also control facebookScheme
and maybe share app.json settings? @ekinalcar
Sure. my app.json looks like this.
{
"expo": {
"name": "ChallengeApp",
"slug": "challenge-app",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"*/"
],
"facebookScheme": "fb...",
"facebookAppId": "...",
"facebookDisplayName": "ChallengeApp",
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.ChallengeApp",
"icon": "./assets/images/icon.png",
"infoPlist": {
"NSCameraUsageDescription": "blabla.",
"NSLocationWhenInUseUsageDescription": "blabla.",
"LSApplicationQueriesSchemes": [
"fbapi",
"fb-messenger-share-api",
"fbauth2",
"fbshareextension"
]
}
},
"description": "blabla"
}
}
@ekinalcar everything looks as expected i guess, if Scheme AppID are correct, it might be better to check errors on,
const {type,token} = await Expo.Facebook.logInWithReadPermissionsAsync('<APP_ID>', {permissions: ['public_profile','email']});
control type, token maybe?
I will check it as soon as possible and let you know. by the way my app works on expo simulator but doesn't when I publish.
@ctur I still couldn't find the problem. I went with the behavior: 'web' and it works perfectly on my phone.thanks anyways.
Hey I'am in sdk 32
And the login works perfectly on Android (any behavior), but I keep having the following error message on IOS
*"Try to perform Facebook login with behavior 'native', but no facebook app id was provided. Specify Facebook app id in app.json or switch to "web" behavior *
It's seems that on IOS the login is not reading the appId from the logInWithReadPermissionsAsync() params ... So I guess it s reading it from app.json, but I specified it...
I tried with native,system, browser
Web behavior works on IOS but I suppose it is because it does not require the facebookappid
The IOS i'am testing on has a version >11
{
"expo": {
"name": "MyApp",
"icon": "./src/assets/images/logo-app.png",
"version": "1.0.29",
"slug": "my-app-slug",
"description": "",
"privacy": "public",
"sdkVersion": "32.0.0",
"orientation": "portrait",
"primaryColor": "#fff",
"facebookScheme": "fb318850582360166",
"facebookAppId": "318850582360166",
"facebookDisplayName": "Peps",
"packagerOpts": {
"assetExts": [
"ttf",
"mp4"
],
"sourceExts": [
"ts",
"tsx"
],
"transformer": "node_modules/react-native-typescript-transformer/index.js"
},
"ios": {
"bundleIdentifier": "com.skyrune.myapp",
"appStoreUrl": "https://itunes.apple.com/app/peps-un-bar-une-promo/id1463105178",
"infoPlist": {
"UIBackgroundModes": [
"location"
],
"NSLocationWhenInUseUsageDescription": "We are asking for your location for blabla",
"LSApplicationQueriesSchemes": [
"fbapi",
"fb-messenger-share-api",
"fbauth2",
"fbshareextension"
]
}
},
"android": {
"package": "com.skyrune.myapp",
"versionCode": 29,
"permissions": [
"LOCATION",
"ACCESS_COARSE_LOCATION",
"ACCESS_FINE_LOCATION",
"READ_INTERNAL_STORAGE",
"WRITE_INTERNAL_STORAGE",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE"
],
"playStoreUrl": "https://play.google.com/store/apps/details?id=com.skyrune.myapp"
},
"splash": {
"image": "./src/assets/images/splash.png",
"backgroundColor": "#262637",
"resizeMode": "contain"
},
"platforms": [
"android",
"ios"
]
}
}
Do I need more than setting my BundleId in the facebook dev console ? ( in the IOS section)
We also have the problem on iOS with the native
behavior: FB-Login-Screen is white after Login. The app is not redirecting to our App. The User is stuck.
Changing the behavior to web
fixes the issue, but users with installed Facebook App are not logged in automatically anymore... On Android, everything's fine.
@musemind I am facing the same issue. did you find any workaround working for the native
behavior?
@musemind @sharma-sanjeev156 Anybody fixed that?
Ok, I have this fixed. Your Facebook scheme is fb preceding your Facebook App ID.
The fix is to add 'scheme': 'com.DOMAIN' to the app.json file, and that should do it.
@cmaronchick ty so much
I'm stuck as well.
Expo 33
For Facebook:
Facebook Login Error: Tried to perform Facebook login with behavior 'null', but no Facebook app id was provided. Specify app id in Info.plist or switch to 'web' behavior
For Google:
I'm not able to view any error yet
, the button isn't functional
Here's what ended up working for me on a release channel for iOS:
DISCLAIMER: I have not tried android, or TestFlight or the App store. This worked on a release channel for me after I was having the same issues as above.
What I did was match the info.plist of section 4. Configure Your Project of the Facebook Login iOS to the infoPlist section in app.json.
I assume it does not work for me on android because I figure I would have to do something similar to the app.json. I have no access to a physical android phone to test the published version, so I do not know. I theorize that for android, you would have to alter the "android" configuration of app.json to align with the 4. Edit Your Resources and Manifest section Facebook Login Android
My setup:
iPhone 6S running iOS 13.1.2
Client Version 2.13.0.107059
Expo SDK 35
app.json:
{
"expo": {
"name": "XXX",
"slug": "XXX",
"privacy": "unlisted",
"sdkVersion": "35.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#000000"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"infoPlist": {
"CFBundleURLTypes": {
"CFBundleURLSchemes": [
"fb#######"
]
},
"FacebookAppId": "#######",
"FacebookDisplayName": "XXX",
"LSApplicationQueriesSchemes": [
"fbapi",
"fb-messenger-share-api",
"fbauth2",
"fbshareextension"
],
},
}
}
}
Expo Facebook logInWithReadPermissionsAsync():
await Facebook.logInWithReadPermissionsAsync(FACEBOOK_APP_ID, { permissions: ['public_profile'] }).then(async (response) => {
if (response.type === 'success') {
// Success
}
}.catch( ... )
Hey all -- I believe this issue has been resolved, and you should be able to get Facebook auth working on supported SDK versions (currently, 33-35) by following all of the required configuration steps in the docs & filling out all the fields in app.json. I'm going to go ahead and close this. Please create a new issue with a full repro case if this still happens in any of the currently supported SDK versions. Thanks!
Most helpful comment
I couldn't get this to work for ages on Testflight even though working perfect on Expo client but then re-read all of the documents to make sure I had things correct. It turned out that where I had confused myself was that I had set up Auth for Expo client BUT when you build the expo client for testflight you are building a standalone app. This may be obvious to a lot of you on here but as a first timer I really hadn't grasped that.
So.. after I followed the instructions for getting my facebook scheme ID etc then reading further instructions to try to work out where to put things in my app.json, I ended up with the below. Works perfect for both my google log in and Facebook (i'm only testing ios builds). Oh, and I made sure that I had upgraded to v32.
Hope this helps some of you - I was stuck for two weeks! Grrrrr.