Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Auth and Firebase - How to add 4 apps under same Facebook app?

Let's say I have 4 apps, "Uber Clone" for iOS and Android and "Uber Driver Clone" for iOS and Android. I am using the same Firebase project for all 4 since they share the same database.

When it comes to Facebook Auth though, I can only add a single Facebook app to Firebase. And for every Facebook App I can only add a single iOS and a single Android app. Therefore how can I make this work?

Firebasers, any recommendation/solution in mind?

like image 215
rgoncalv Avatar asked Mar 18 '18 00:03

rgoncalv


2 Answers

Multiple apps on a single Facebook app

  1. Go to your Facebook developer console
  2. Go to your app's page
  3. Go to the basic settings

enter image description here

  1. Add all relevant bundle IDs
  2. Here's the key: Add a different URL Scheme suffix for each app. This differentiates each iOS app under your single Facebook App.

enter image description here

  1. In each of your apps info.plist add the suffix information (Make sure both the URL scheme is updated and the "FacebookURLSchemeSuffix" is added!)

enter image description here

  1. Now each of your apps is under the same Facebook App, and thus can register under the same Firebase Realtime Database. Check this out for more info: Two iOS apps using the same Facebook app ID - is it possible?

At this point in time, it does not seem possible to have multiple FB apps under a single Firebase Realtime Database.

like image 85
Peter Tao Avatar answered Oct 18 '22 14:10

Peter Tao


A single Facebook App is allowed to connect to multiple iOS apps and multiple Android apps. For iOS apps, you can specify multiple Bundle ID at Facebook App settings page.

like image 41
mono Avatar answered Oct 18 '22 14:10

mono