1 | # expo-facebook
|
2 |
|
3 | Expo universal module for Facebook SDK
|
4 |
|
5 | # API documentation
|
6 |
|
7 | - [Documentation for the master branch](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/sdk/facebook.md)
|
8 | - [Documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/facebook/)
|
9 |
|
10 | # Installation
|
11 |
|
12 | This package is pre-installed in [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects. You may skip the rest of the installation guide if this applies to you.
|
13 |
|
14 | For bare React Native projects, you must ensure that you have [installed and configured the `react-native-unimodules` package](https://github.com/unimodules/react-native-unimodules) before continuing.
|
15 |
|
16 | ### Add the package to your npm dependencies
|
17 |
|
18 | ```
|
19 | npm install expo-facebook
|
20 | ```
|
21 |
|
22 | ### Configure for iOS
|
23 |
|
24 | Run `pod install` in the ios directory after installing the npm package.
|
25 |
|
26 | ### Configure for Android
|
27 |
|
28 | No additional set up necessary.
|
29 |
|
30 | In `AndroidManifest.xml`, add the following element within your `<application>` element:
|
31 |
|
32 | ```xml
|
33 | ...
|
34 | <!-- The Facebook SDK runs FacebookInitProvider on startup and crashes if there isn't an ID here -->
|
35 | <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fb0"/>
|
36 | </application>
|
37 | ```
|
38 |
|
39 | # Contributing
|
40 |
|
41 | Contributions are very welcome! Please refer to guidelines described in the [contributing guide]( https://github.com/expo/expo#contributing).
|