cordova-plugin-facebook-connect / cordova-plugin-facebook-connect

Use the latest Facebook SDK in your Cordova and Ionic projects
Other
64 stars 90 forks source link

Android: can't install multiple apps w/same Facebook app (APP_ID) #100

Open sfeast opened 2 years ago

sfeast commented 2 years ago

[x ] I'm reporting a reproducible issue

Describe the Bug of feature request Expected that we can use the same Facebook app with multiple android apps. However when installing a 2nd app that uses the same Facebook app (APP_ID) Android throws this alert:

image

Expected Behavior

My understanding was that we should be able to use multiple apps with the same Facebook app. Especially since there is this feature for this use case (although I see it is for iOS).

Plugin version, OS, devices, etc Mac OS 11.6 Testing on Android emulator w/API level 30 cordova 10.0.0 cordova ios platform 10.1.1

Note I assume this is a facebook SDK issue rather than this plugin, but since https://github.com/jeduan/cordova-plugin-facebook4 didn't have this issue I'm wondering if this behavior is considered a bug.

flastowizka commented 2 years ago

The same problem here

sullivanets1 commented 2 years ago

I have this problem also, multiple different android apps using the same Facebook app id, using suffixes to return to the correct app afterwards.

I had been on https://github.com/jeduan/cordova-plugin-facebook4 until this last build, where I updated due to in app browser login being deprecated.

campagna91 commented 2 years ago

Same here :(

HCJSolutions commented 2 years ago

I found a temporary solution is add ${applicationId}

  1. modified the platforms\android\app\src\main\AndroidManifest.xml find a node <provider android:authorities="com.facebook.app.FacebookContentProvider${applicationId}123456789" android:exported="true" android:name="com.facebook.FacebookContentProvider" /> or
  2. change it at plugin folder plugins\cordova-plugin-facebook-connect\plugin.xml find the line <provider android:authorities="com.facebook.app.FacebookContentProvider${applicationId}$APP_ID"
apren commented 2 years ago

Another temporary solution:

  1. Set any APP_ID, for example APP_ID = "app_package_name"
  2. After init app use code facebookConnectPlugin.setApplicationId('your_facebook_app_id');
michel-silva commented 2 months ago

Hi @apren and @HCJSolutions,

Thank you for sharing your solution. Could you share more details about how can use the temporary solution for this problem? I made some tries but nothing worked for me.