PhoneGap的添加Facebook连接插件 [英] PhoneGap add Facebook Connect plugin

查看:159
本文介绍了PhoneGap的添加Facebook连接插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要添加 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.

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

  1. 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 > 
    

  • 请阅读并遵循文档<一href="https://github.com/phonegap-build/FacebookConnect/blob/df97806027da5ba54ab94e093c6b3c0f2ec5de5b/README.md"相对=nofollow>此处。一定要注意标题为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的构建将处理为你。

    这篇关于PhoneGap的添加Facebook连接插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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