当我做 :
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/