Template for using Facebook login with Firebase. State management with Flux + Redux. This example app simply displays your Facebook profile picture, as well as a "bio" that gets stored in the users table of your firebase app. The app listens for changes to your firebase table(s) and updates in real time.
- On the Facebook for Developers site, get the App ID and an App Secret for your app.
- In the Firebase console, open the Auth section.
- On the Sign in method tab, enable the Facebook sign-in method and specify the App ID and App Secret you got from Facebook.
- Then, make sure your OAuth redirect URI (e.g. my-app-12345.firebaseapp.com/__/auth/handler) is listed as one of your OAuth redirect URIs in your Facebook app's settings page on the Facebook for Developers site in the Product Settings > Facebook Login config.
- Create a new react-native project.
- Copy
package.json, index.*.js, App.js, and src/directory to your new project. - Run
npm install --save - Run
react-native linkto compile Facebook SDK native extensions.
Make the following changes to your android project files:
- Add app id string to
strings.xml - Add meta data tag to
AndroidManifest.xml - Modify
MainActivity.javaandMainApplication.java
See ANDROID_TEMPLATE_FILES/ in this project for reference. More information can be found at https://github.com/facebook/react-native-fbsdk.
Not tested yet.
I built this project to be a simple, modular, and easily extended starting point for a common pattern. The other guides and projects I've found only partially demonstrate integrating Firebase, social login, and Flux/Redux.
Feedback and contributions are most welcome (especially a tester for iPhone)!


