Prior to using this guide, please install:
Create your React Native project
A single React Native project is used for both iOS and Android development. The steps in this section create the native projects for both iOS and Android.
- Open up a terminal window and navigate to the folder where you would like to store your project.
- Create your React Native application by typing the following command in to your terminal window. Replace
[YourApp]with the name of your application.
- Navigate to your new application's project folder.
- Install and link the Facebook SDK for React Native packages and dependencies.
react-native init [YourApp]
react-native install react-native-fbsdk react-native link react-native-fbsdk
Note: If the
react-native install command is not found, please update to the latest version of React Native.
Configure Your Native Project
You've installed the Facebook SDK for React Native, but you must now perform some additional steps to install and configure the native project for each application platform. Use the guides below to configure the projects for your desired platforms.
For Android, there are two different sets of instructions for configuring your native project based on the version of React Native that you are using. To determine the version of React Native that is installed on your system, use the following command:
npm view react-native version