PhoneGap的添加Facebook连接插件插件、PhoneGap、Facebook

由网友(趁我还年轻!)分享简介:我要添加 com.phonegap.plugins.facebookconnect 来我的PhoneGap构建Android应用程序,但我无法做到这一点。在商务部的网站,他们说要加I want to add com.phonegap.plugins.facebookconnect to my PhoneGap bu...

我要添加 com.phonegap.plugins.facebookconnect 来我的PhoneGap构建Android应用程序,但我无法做到这一点。 在商务部的网站,他们说要加

I want to add com.phonegap.plugins.facebookconnect to my PhoneGap build android app but I unable to do it. In doc site they say to add

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

的config.xml 文件,但有3 的config.xml 在PhoneGap的文件夹建立,甚至当我添加它还有什么比?应该有文件添加到项目如 CDV-插件-FB-connect.js Facebook的JS-sdk.js 这样我就可以将它们包含在index.html的,但没有任何文件被添加到项目中。如何管理的?

in config.xml file but there is 3 config.xml files in PhoneGap build folder and even when I add it what than? There should be files added to project like cdv-plugin-fb-connect.js and facebook-js-sdk.js so I can include them in index.html but none of files are added to project. How can I manage that?

推荐答案

下面的答案是PhoneGap的建造。无视。

Answer below is for phonegap-build. Disregard.

添加下面的config.xml文件,并确保你把你的config.xml中的根文件夹与您的index.html文件:

Add the below to your config.xml and ensure you place your config.xml in the root folder with your index.html file:

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

添加下面的&LT; HEAD&GT;&LT; /头&GT;你希望你的index.html文件,每一个.html文件中访问插件脚本:

Add the below to the <head></head> of your index.html file and every .html file that you want to access the plugin scripts:

<script scr="phonegap.js"></script>
<script src="cdv-plugin-fb-connect.js"></script > 
<script src="facebook-js-sdk.js"></script > 

请阅读并遵循文档此处。一定要注意标题为Facebook的要求,并设定的段落。

如何将照片从iPhoto上传到Facebook

Read and follow the documentation located here. Be sure to pay attention to the paragraph titled "Facebook Requirements and Set-Up".

完成后,上传你的压缩项目build.phonegap.com并等待编译你的项目。

Once complete, upload your zipped project to build.phonegap.com and wait for your project to be compiled.

注:

您应该只在您的项目的根目录1 config.xml文件。 请不要在phonegap.js,CDV-插件-FB-connect.js文件或Facebook-JS-sdk.js文件添加到您项目的根。 PhoneGap的构建将处理为你。
阅读全文

相关推荐

最新文章