0

This question is related to the issue I opened few days ago https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1173

Summary: be able to use phonegap-facebook-plugin under CLI-5.2

As I have an important release to do and the repo owner is not responding, I'm trying to find a solution to build my application on PGB with official phonegap-facebook-plugin.

I'm looking for one of these:

CyrilleGuimezanes
  • 1,598
  • 1
  • 18
  • 33
  • from your Android log: `4: /project/phonegap-facebook-plugin/nego-FacebookLib/ant-build does not exist.` – Dawson Loudon Nov 04 '15 at 16:28
  • Yes, I read the log :) I think "ant-build" should be a folder because it's define on this file: https://github.com/Wizcorp/phonegap-facebook-plugin/blob/master/platforms/android/FacebookLib/custom_rules.xml I will try to create it manually... – CyrilleGuimezanes Nov 04 '15 at 16:38
  • If you need `ant`, it is still supported, `gradle` is now the default. The following blog post will help: [Android Builds Now Using Gradle By Default](http://phonegap.com/blog/2015/09/28/android-using-gradle/). Go to the bottom of the post to force `ant`. –  Nov 04 '15 at 21:26
  • @Weby, Did you resolve your issue? –  Nov 08 '15 at 01:08
  • @JesseMonroy650 Sorry for this late answer... not enough time to fork and fix the plugin for the moment... maybe tomorrow :( – CyrilleGuimezanes Nov 10 '15 at 13:47

1 Answers1

2

Solution:

You have to add (edit) you config.xml as it:

<preference name="android-minSdkVersion" value="16" />
<preference name="android-build-tool" value="gradle" />
<gap:plugin name="phonegap-facebook-plugin"  source="npm">
   <param name="APP_ID" value="XXXX" />
   <param name="APP_NAME" value="XXXXX" />
</gap:plugin>

Bonus: If you want to update to a new Facebook SDK juste change phonegap-facebook-plugin by cordova-plugin-facebook4 which refer to this fork https://github.com/jeduan/cordova-plugin-facebook4

CyrilleGuimezanes
  • 1,598
  • 1
  • 18
  • 33