Facebook login in React native

Step 1 : Create App On Facebook Developers And Add Basic App Info

Step 2: Add react-native-fbsdk library and link library

yarn add react-native-fbsdk
npm install react-native-fbsdk
cd ios && pod install 

Step 3 : Configuration ANDROID/IOS Projects

A ) Android Configuration

<string name="facebook_app_id">Facebook App ID</string>
<uses-permission android:name="android.permission.INTERNET"/>
<application android:label="@string/app_name" ...>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>

B) IOS Configuration

  1. In Xcode, right-click your project’s Info.plist file and select Open As -> Source Code.
  2. Insert the following XML snippet into the body of your file just before the final </dict> element.

Step 4: Add code in react native project for Login



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store