Select Facebook from the supported type of authentication, and your Facebook authentication is set up.
Setup after Project download
To authenticate with Facebook, follow the steps below in your application for Android and iOS.
Register your Application
At Facebook developers page register and configure your application, and copy the App ID.
Edit Resources and Manifest
- Add your App ID and Client Token at
/android/app/src/main/res/values/strings.xmlin your application, as shown below;
<?xml version="1.0" encoding="utf-8"?>
<!-- Replace "000000000000" with your Facebook App ID here. -->
<!-- Replace "YOUR_CLIENT_ACCESS_TOKEN" with your client access token here. -->
- Open the
/app/manifest/AndroidManifest.xmlfile and add
meta-dataelements to the
applicationelement for your app ID and client token, as shown below;
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>
If the file doesn’t exist then create a new file at mentioned path and add it similarly.
Register your Application
Register and Configure Your App with Facebook at the Facebook Login documentation for iOS.
You can skip "Step 2: Set up Your Development Environment" and "Step 5: Connect Your App Delegate".
After you've done that, look for your
Facebook App ID. You can find your Facebook App ID in your Facebook App's dashboard in the Facebook developers console.
Once you have the Facebook App ID figured out, then you'll just have to add or paste the following to your
Info.plist file and add required data wherever mentioned in comments, before the ending
Path to your Info.plist file:
<your project root>/ios/Runner/Info.plist
Replace "fbAPP-ID" with your Facebook App ID here.
**NOTE**: The scheme needs to start with `fb` and then your ID.
Replace "APP-ID" with your Facebook App ID here.
Replace "CLIENT-TOKEN" with your Facebook client-token here.
Replace "APP-NAME" with your application name here.
If you get below type of error
.gradle/caches/transforms-2/files-2.1/24fa3aa8d2270e5eb067bbe36e9b7563/jetified-kotlin-stdlib-1.5.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15., then go inside
android/build.gradle and change the below:
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.4.32'
After this process, you must reinstall your application to check the implementation.
To release your app, you have to follow the steps mentioned in Facebook Developer Documentation
Got a question? Ask here.