How to add facebook plugin to cordova using cli

I am using cordova 3.3.0 cli.I found manual installation documentation that is for the eclipse / xcode project. There is also documentation for the phonegap assembly that we do in config.xml. I just want to install the Facebook plugin in my cordova project, which I create through the CLI cordova.

Update : I moved from the problem. Thanks to Cl for his help. I wrote a complete tutorial for this. My tutorial for facebook plugin

+7
android facebook cordova
source share
2 answers

In fact, in the CLI, you just need to add the variables APP_ID and APP_NAME to your team. Something like that:

 C:\myProject>cordova plugin add https://github.com/phonegap/phonegap-facebook-plugin --variable APP_ID=your_facebook_app_id --variable APP_NAME=your_facebook_app_name 

I installed it this way, but not sure if the application works or not. Something to experience.

update:

I had a problem with the phonegap build giving me the error One of your plugins requires a parameter: APP_ID, APP_NAME . This happened because I did not add these variables to the config.xml file.

It allowed

 <gap:plugin name="com.phonegap.plugins.facebookconnect"> <param name="APP_ID" value="your_facebook_app_id" /> <param name="APP_NAME" value="your_facebook_app_name" /> </gap:plugin>` 

Everything works perfectly! Hope this helps someone.

update 2:

Remember to change the plugin.xml file as root / plugins / com.phonegap.plugins.facebookconnect / plugin.xml

 <preference name="APP_ID" /> <preference name="APP_NAME" /> 
+5
source share

Perhaps this will help if you clarify which plugin you are trying to install exactly ...

In case the plug-in is connected to facebook here , you can try to install it as follows:

 cd yourprojectname cordova plugin add https://github.com/phonegap/phonegap-facebook-plugin 

but it seems that it still does not work, and you will have to perform a manual installation :(

quote from readme.md file:

This plugin is based on the plugin. To install it in the application, simply execute the plugin as follows; It does not currently work with the plugin at all. PROGRESS WORK

so I think you have to wait a little longer to install it using the CLI ...

0
source share

All Articles