Firebase Facebook SignIn
1: First of all goto RNFirebase and install it
# Install & setup the app module
yarn add @react-native-firebase/app
# Install the authentication module
yarn add @react-native-firebase/auth
2:click Authenticaion tab then click on social Auth
3:now goto fb community-supported React Native library
and install FbSDK libarary
npm install --save react-native-fbsdk-next
4:now configure projects And click on android: Getting Started Guide
5:then click on quick start for android Quick Start for Android
6:now its open Meta for developers site
7:then click on quick start
8:then login your fb account and create an app
9:select an app type (none): then click next
10:then add Display name and click on create app
11:then click on fb login set up
12: choose android
13:then click on next
14:then copy mavenCentral() and past it into android/build.gradle in repositories{}
15:then copy implementation 'com.facebook.android:facebook-android-sdk:latest.release'
and paste into Android/App/build.gradle in dependencies{} then click next
16:now add Package Name copy the name from android/app/src/main/androidManifest.xml
and paste into package name input field
17:then add Default Activity Class Name like this com.run_firebasefb.MainActivity
18:then save and continue
19:now add Key Hashes first of all run this command in terminal cd android then run this one ./gradlew signingReport it gives SHA1 key SHA256 key
20:then copy SHA1 key and paste it into this site and convert SHA1 to key heshes
http://tomeko.net/online_tools/hex_to_base64.php
{Enable Single Sign On} skip this step and click on next
21:then copy hashes and past into key hashes input field save it and goto and other step
22:then copy <string name="facebook_app_id">1234</string> and paste it into android/app/src/main/res/values/strings.xlm like this one
24:now go to Firebase project click on authentication tap and
selecct Sign-in method then click on facebook and enable it now add APP ID and APP SECRET
25: to find app id and app secret go to meta for developers site
26:then select app that you created then click on settings then go to Basics
27:now copy app id and app secrets and paste into firebase project app id app secrets input fields
Now Run The project....................
Comments
Post a Comment