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

<resources>
    <string name="app_name">Run_firebasefb</string>

    <string name="facebook_app_id">1234</string>

</resources>

23:then copy <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

and paste into android/app/src/main/AndroidManifest.xml like this
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.run_firebasefb">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:theme="@style/AppTheme">

this line <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
        android:launchMode="singleTask"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
    </application>
</manifest>


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....................

Popular posts from this blog

PST JST Prep - Sindh Teachers Privacy Policy

Privacy Policy For Real Love Calculator-Prank app

DeepCut App Privacy Policy