Cordova Facebook插件: missing variables APP_ID, APP_NAME

标签 cordova phonegap-plugins cordova-3 cordova-plugins

当我做 :

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

我得到错误:
Error: Variable(s) missing: APP_ID, APP_NAME

我必须在哪里配置这些变量?

最佳答案

查看该github存储库上的README.md文件的底部。您会看到它为您提供了安装插件并包括变量的说明:

plugman install --platform [PLATFORM] --project [TARGET-PATH] --plugin [PLUGIN-PATH] --variable APP_ID="[APP_ID]" --variable APP_NAME="[APP_NAME]"

where
    [PLATFORM] = ios or android
    [TARGET-PATH] = path to folder containing your phonegap project
    [PLUGIN-PATH] = path to folder containing this plugin
    [APP_ID] = Your APP_ID as registered on Facebook

Cordova CLI在后台使用Plugman,因此您可以使用它来插入变量名称,如下所示:
cordova plugin add https://github.com/phonegap/phonegap-facebook-plugin.git --variable APP_ID="my-app-id" --variable APP_NAME="my-app-name"

关于 Cordova Facebook插件: missing variables APP_ID, APP_NAME,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22355792/

相关文章:

jquery mobile - 在 iPhone 中加载长 ListView 时页面闪烁

android - jQuery Mobile Listview - Phantom/Android 4 中未刷新

缺少cordova_plugins.js

javascript - Apache Cordova 可以编译为旧版 Windows 桌面应用程序(非 Metro)吗?

cordova - 错误: Zombie Apocalypse has started

javascript - 将列表值传递到 JQuery Mobile 中的另一个页面

javascript - PhoneGap Android 应用程序中的页面不刷新

android - 在安装 Cordova (PhoneGap) 期间,我收到类似 "npm WARN engine Cordova-js@3. 8.0: wanted:..."的警告

android - PhoneGap 条码扫描仪 - ClassNotFound

android - Apache Cordova 和 ADT - 更新 'www' 文件夹