Run Android platform error with "cordova-plugin-facebook4"

Gracias… funciono correctamente

thanks it worked for me tooo

You can get it working by changing following things without rolling back to previous version (ionic and cordova users only)

<framework src="com.facebook.android:facebook-android-sdk:4+"/>
to
<framework src="com.facebook.android:facebook-android-sdk:4.26.0"/>
in plugin.xml of plugin located in /plugins/cordova-plugin-facebook4

and overwrite
compile "com.facebook.android:facebook-android-sdk:4.+"
with
compile "com.facebook.android:facebook-android-sdk:4.26.0"
both in /platforms/android/build.gradle and /platforms/android/project.properties in your cordova or ionic project.

15 Likes

I’ve tried this and it worked beautifully, thank you!

Hello,Its solved my problem , Thanks, but in facebook login, i am now getting this error

Error in Error callbackId: FacebookConnectPlugin20XXXX30

Can you please help me on this ?

Hi, It seems like you are getting this error for iOS, right? Please share complete details or steps you took. It will be helpful if you can explain the case.

No, its android. Earlier i got error at time of build for facebook. i solved it by your solution and android build successfully.

But when i check facebook login feature, it gives me error which i mention.

Please check if have provided Wrong App ID, secret key (if used), key hashs or android project details while installing FB plugin and in FB developer account.

Hi, thank you very. It work for me on two system

It worked beautifully.

Yessss! This saved my life :slight_smile:

Open your poject with android studio and check the dependancies.

I tried them one at a time and adding latest android to the platforms worked for me! Thanks for the answer :slight_smile:

I worked correctly with:

Project > platforms > android > project.properties

.....
cordova.system.library.1=com.google.firebase:firebase-core:10.+
cordova.system.library.2=com.google.firebase:firebase-messaging:10.+
cordova.system.library.7=com.google.android.gms:play-services-auth:10.+
cordova.system.library.8=com.google.android.gms:play-services-identity:10.+
cordova.system.library.9=com.facebook.android:facebook-android-sdk:4.16.0

ionic cordova build android

I hope this helps someone (Y)

1 Like

worked for me as well .