Facebook Developer Console
The first thing we need to do is to create a new application in Facebook’s developer dashboard, and this app is the one that Facebook will use to ask our users for their permission when we try to log them into our React Native application. For that, you’ll need to go to the Facebook developer console and create a new app.
Add your Platforms to Facebook
For Android:
Add Facebook App ID
- Add your Facebook App ID to your app and update your Android manifest.
- Open your strings.xml file, for example:/app/src/main/res/values/strings.xml .
- Add a new string with the name facebook_app_id containing the value of your Facebook App ID:
- Add your development and release key hashes
To ensure the authenticity of the interactions between your app and Facebook, if your app has already been published, you should add your release key hash too. You’ll have a unique development key hash for each Android development environment.
To generate a development key hash, on Mac, run the following command:
This command will generate a 28-character key hash unique to your development environment. Copy and paste it into the field below. You will need to provide a development key hash for the development environment of each person who works on your app. If your app has already been published, you should also add a hash of your release key.
Android apps must be digitally signed with a release key before you can upload them to the store. To generate a hash of your release key, run the following command on Mac or Windows substituting your release key alias and the path to your keystore:
This will generate a 28-character string that you should copy and paste into the field below. Also, see the Android documentation for signing your apps.
For iOS:
Configure your info.plist and project settings
Find the .plist file in the Supporting Files folder in your Xcode Project.
- Right-click your .plist file and choose “Open As Source Code”.
- Copy & Paste the XML snippet into the body of your file.