Reputation: 483
I’m trying to get Facebook Login working using the expo-facebook package (I'm using the Managed Workflow)
I created my application in the Facebook Developer Console and copied the “App ID”.
This is the code I'm using inside my React Native Expo app:
async facebookLogin() {
await Facebook.initializeAsync('26327628297297')
const response = await Facebook.logInWithReadPermissionsAsync({ permissions: ['public_profile']})
console.log(response)
}
My understanding is that while using the Expo Client App there is no need to do any extra configuration because it will be using Expo’s Facebook App ID for all API calls.
The problem is that after logging in I get this error message:
Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App’s settings. To use this URL you must add a valid native platform in your App’s settings.
I also tried added “facebookScheme” to my app.json but that didnt seem to help:
"facebookScheme": "fb26327628297297",
Thanks for your time!
Upvotes: 2
Views: 2282
Reputation: 25363
Actually you just have to add platform in your app settings
So here are the steps
Open https://developers.facebook.com and select your app
Settings > Basic > Add Platform
use host.expo.Exponent
as bundle id
3.Now select iOS from the window and add your Bundle ID and rest of the information and click on Save changes
and that's it. Hope it helps you .. All the best
Upvotes: 2