Closed tanjunior closed 4 years ago
I couldn't reproduce the error and therefore don't think it's an issue but more a support inquiry.
When I look your "step to reproduce" I notice that you are using the same "appId" keywords for both setting up your project and the plugin but these are different.
From the documentation:
Make sure you've registered your Facebook app with Facebook and have an APP_ID https://developers.facebook.com/apps.
Also as you are using Capacitor, you may want to have a look to the tutorial of Josh Morony: https://www.joshmorony.com/using-cordova-plugins-that-require-install-variables-with-capacitor/
In my case I had to modify strings.xml like the following:
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">myApp345</string>
<string name="title_activity_main">myApp345</string>
<string name="package_name">com.example.yolo</string>
<string name="custom_url_scheme">com.example.yolo</string>
<string name="fb_app_id">123456789</string>
<string name="fb_app_name">myApp345</string>
</resources>
and add this to AndroidManifest.xml:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/fb_app_id" />
And then everything went fine. I hope this help, good luck.
Please do not submit support requests or "How to" questions here. Instead, please use channels like StackOverflow or the Ionic forum
For issues or feature requests related to the code in this repository file a Github issue and provide as much details as possible
Bug or feature request
[X] I'm reporting a reproducible issue with the code [ ] I'm reporting a feature request
Describe the Bug of feature request
Expected Behavior
App to launch successfully
Plugin version, OS, devices, etc Windows 10 Home ionic 4.7.1 angular 8.1.2 "@ionic-native/facebook": "^5.18.0", "cordova-plugin-facebook4": "^6.2.0" Android Studio 3.5.3 JRE: 1.8.0_202-release-1483-b03 amd64 AVD API26 OPPO R9S Plus
Sample repo Steps to reproduce
Additional Context
Seems like I am not the only one facing this issue stackoverflow.com/questions/56738410/app-crashes-on-startup-after-adding-ionic-cordova-plugin-facebook4