Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Facebook 在phonegap buil中上载到www时出错_Facebook_Cordova - Fatal编程技术网

Facebook 在phonegap buil中上载到www时出错

Facebook 在phonegap buil中上载到www时出错,facebook,cordova,Facebook,Cordova,当我尝试在phonegap中上传一个关于登录facebook的简单演示时,我在android中收到一条错误消息 错误-插件错误(您可能需要从应用程序中删除插件文件):错误:您可以在此处修复此问题 我的结构是 Index.html <!DOCTYPE html> <html> <head> <script src="phonegap.js"></script> <!-- cordova facebook p

当我尝试在phonegap中上传一个关于登录facebook的简单演示时,我在android中收到一条错误消息

错误-插件错误(您可能需要从应用程序中删除插件文件):错误:您可以在此处修复此问题

我的结构是

Index.html

    <!DOCTYPE html>
<html>
<head>

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



</head>
<body>

    <div id="data">Hello </div>

    <button onclick="login()">Login</button>
    <button onclick="me()">Me</button>

    <script>
        document.addEventListener('deviceready', function() {
            try {
                alert('Device is ready! Make sure you set your app_id below this alert.');
                FB.init({
                    appId : "myid",
                    nativeInterface : CDV.FB,
                    useCachedDialogs : false
                });
                document.getElementById('data').innerHTML = "FB init executed";
            } catch (e) {
                alert(e);
            }
        }, false);

    </script>
</body>
</html>

你好
登录
我
document.addEventListener('deviceready',function(){
试一试{
警报('设备已准备就绪!请确保将应用程序id设置在此警报之下');
FB.init({
appId:“myid”,
国家界面:CDV.FB,
useCachedDialogs:false
});
document.getElementById('data').innerHTML=“FB init executed”;
}捕获(e){
警报(e);
}
},假);
config.xml

    <?xml version="1.0" encoding="UTF-8"?>
<widget xmlns     = 'http://www.w3.org/ns/widgets'
        xmlns:gap = 'http://phonegap.com/ns/1.0'
        id        = "com.test.test"
        version   = "1.0.0">
    <name>test</name>

    <description>
        test
    </description>


    <feature name="http://api.phonegap.com/1.0/device" />

    <preference name="phonegap-version" value="2.7.0" />
    <preference name="orientation"      value="default" />
    <preference name="target-device"    value="universal" />
    <preference name="fullscreen"       value="false" />

    <preference name="prerendered-icon" value="true" />

    <icon src="img/phonegap/icons/logo.png" />

    <gap:splash src="img/phonegap/splash/splash.png" />


    <gap:plugin name="FacebookConnect">
        <param name="APP_ID" value="myid" />
        <param name="APP_NAME" value="test" />
    </gap:plugin>


    <feature name="http://api.phonegap.com/1.0/geolocation"/>

    <access origin="http://www.test.es"/>

</widget>

测试
测试

此外,我的www还包含cdv插件fb connect、facebook_js_sdk、img

和……问题是什么?我想知道如何解决错误。结构正确吗?