Cordova Facebook插件:缺少变量APP_ID,APP_NAME [英] Cordova Facebook plugin : missing variables APP_ID, APP_NAME

查看:423
本文介绍了Cordova Facebook插件:缺少变量APP_ID,APP_NAME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我这样做:

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

我得到错误:

Error: Variable(s) missing: APP_ID, APP_NAME

我需要配置这些变量吗?

Where do I have to configure these variables ?

推荐答案

看看在这个github仓库的README.md文件的底部。你会看到它给你安装插件和包括变量的说明:

Look at the bottom of the README.md file on that github repository. You'll see it gives you instructions for installing the plugin and including the variables:

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,因此您可以使用它注入变量名这:

The Cordova CLI uses Plugman behind the scenes, so you can use it to inject variable names like this:

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插件:缺少变量APP_ID,APP_NAME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆