Phonegap facebook插件错误

时间:2015-06-18 15:35:02

标签: javascript android facebook cordova

我是手机应用程序开发的新手。在我的应用程序中,我登录了facebook。 我在js文件夹中添加了facebookConnectPlugin.js,但它给出了错误 -

 ReferenceError: Can't find variable: cordova at file:///android_asset/www/js/facebookConnectPlugin.js:12
下面的

是我的index.html代码 -

<!DOCTYPE html>
<html>
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
    <link href="gk/lib/jquery.mobile/1.4.5/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="css/style.css">

    <script src="ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="js/facebookConnectPlugin.js"></script>

    <script>
        $(document).on("mobileinit", function () {
          $.mobile.autoInitializePage = false;
          $.mobile.hashListeningEnabled = false;
        });
         function mobileInitPage() {
           $.mobile.hashListeningEnabled = true;
           $.mobile.initializePage();
        };
      </script>

     <script src="mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
     <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3&sensor=false&language=en"> </script>
     <script type="text/javascript" src="http://jquery-ui-map.googlecode.com/svn/trunk/ui/min/jquery.ui.map.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="cordova.js"></script>

<!-- GK Loader use RequireJS to load module -->
     <script src="docs/release/2.1.11/minified/require.js"></script>

<!--Plug in GK-->
     <script src="components/jquery.gk/jquery.gk.min.js"></script>

<!-- Load GK components -->   
     <script components="http://jqmdesigner.appspot.com/components/gk-chart/linechart.html,http://jqmdesigner.appspot.com/components/gk-ext/raty.html" callback="mobileInitPage" src="http://jqmdesigner.appspot.com/components/gk-loader/gk-loader.js"></script>

<!-- Graph JS Script -->
      <script src="http://code.highcharts.com/stock/highstock.js"></script>
      <script src="http://code.highcharts.com/stock/modules/exporting.js"></script>


      <script type="text/javascript" src="http://cdn.pubnub.com/pubnub-3.7.4.min.js"></script>
       <script type="text/javascript" src="js/appNotification.js"></script>

<!-- Export JS  -->
<script type="text/javascript" src="js/globalObjects.js"></script>
<script type="text/javascript" src="js/appApi.js"></script>
<script type="text/javascript" src="js/application.js"></script>
<script type="text/javascript" src="js/facebook.js"></script>
<script>
</script>
  <title>BrWiki App</title>
  </head>

我无法理解为什么我的应用中出现了错误。 应用程序显示警告消息 -

  

协议不支持gap / ready

0 个答案:

没有答案