Build React Native Fitness App #13: Expo Facebook login

Krissanawat Kaewsanmuang
Feb 8 · 3 min read

This tutorial is the thirteenth chapter of the series build fitness tracker this app use for track workouts, diets, or health activities and analyze data and display suggestions. The ultimate goal is to create food and health recommendation using Machine learning. We start with creating an app that the user wants to use and connect to google health and apple heath for gathering everything to create the dataset that applies for train model later. I start with the ultimate goal. Still, we will begin to build a react native app and set up screen navigation with React navigation. inspired by React native template from instamobile

here we continued from the previous chapter that we migrate codebase to Expo our app is not required any advanced feature for now that we can use Expo manage template for a fast workflow but the future if we required feature that out of support we can eject project from manage to bare workflow, for now, Expo team have release set of package that we use on manage workflow to individual package that pain is gone

this chapter we will implement Google and Facebook login by Expo package

Facebook login

change bundle identifier comes from Expo client app

Add host.exp.Exponent as an iOS Bundle ID. then add rRW++LUjmZZ+58EbN5DVhGAnkX4= in Android Key hash

add app id to app.json in an extra key that we create a new one

now we can come back to LoginScreen.js for finishing login logic

first import firebase and expo facebook package and Expo constant for the handle environment variable

then we initial getting AppId from app.json

then start facebook login after getting access token we add to Firebase

and we will see a result like a screenshot below

Conclusion

this chapter we learn how to use Facebook Login with Expo .so simple and sweet Expo handle all everything help us move quickly for next chapter we will try Google login


Originally published at Kriss.

JS GEEK

for JS Coder

Krissanawat Kaewsanmuang

Written by

React native passionate developer, Coffee addict https://kriss.io

JS GEEK

JS GEEK

for JS Coder

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade