1. Home
  2. Docs
  3. Documentation
  4. Facebook Login
  5. Facebook Login on Android

Facebook Login on Android

This section assumes you’ve already set up Firebase Auth with Facebook in the previous section. If you haven’t done that yet, please go back and complete those steps first.

To set up Facebook Login in the Android app, follow the next steps, in order.

1. Generate a Key Hash for your release & debug keystore

Follow Facebook’s documentation to generate a key hash for your debug or/and release keystore. This is used for security purposes.

2. Place your package name and Key Hash in Facebook

In Facebook Developers, go to Your app -> Settings -> Basic. In the Android section, add your package name and the key hash.

The package name is the applicationId, which you set up while configuring Firebase. As a reminder, you can find the applicationId in android/app/build.gradle file.

3. Update the FB App ID in the source code

In the code, open android/app/src/main/res/values/strings.xml file, and replace the facebook_app_id value, with your own Facebook App ID (obtained in the previous section).

Now build and run the app again, and Facebook Login will work with your own app.

Was this article helpful to you? Yes No 1

How can we help?