尝试调用 FB.login() 函数时遇到问题。
堆栈跟踪表明 facebook 连接插件已正确初始化,但是当我尝试调用登录函数时出现错误:Cannot call method 'split' of undefined at file:///android_asset/www/cdv-plugin-fb-连接.js:39
似乎第 39 行的 params 变量未定义。
我正在使用在 android 4.1.1 HTC one X 上开发的 cordova 2.6.0.js
04-17 11:07:18.804: I/CordovaLog(27283): Changing log level to DEBUG(3)
04-17 11:07:18.804: I/CordovaLog(27283): Found preference for useBrowserHistory=true
04-17 11:07:18.804: D/CordovaLog(27283): Found preference for useBrowserHistory=true
04-17 11:07:18.804: I/CordovaLog(27283): Found preference for exit-on-suspend=false
04-17 11:07:18.804: D/CordovaLog(27283): Found preference for exit-on-suspend=false
04-17 11:07:18.804: D/DroidGap(27283): DroidGap.onCreate()
04-17 11:07:19.499: D/JsMessageQueue(27283): Set native->JS mode to 2
04-17 11:07:19.519: D/DroidGap(27283): DroidGap.init()
04-17 11:07:19.559: D/CordovaWebView(27283): >>> loadUrl(file:///android_asset/www/login.html)
04-17 11:07:19.559: D/PluginManager(27283): init()
04-17 11:07:19.584: D/CordovaWebView(27283): >>> loadUrlNow()
04-17 11:07:19.584: D/DroidGap(27283): Resuming the App
04-17 11:07:19.664: D/SoftKeyboardDetect(27283): Ignore this event
04-17 11:07:19.879: E/(27283): file /data/data/com.nvidia.NvCPLSvc/files/driverlist.txt: not found!
04-17 11:07:19.879: I/(27283): Attempting to load EGL implementation /system/lib//egl/libEGL_tegra_impl
04-17 11:07:20.154: I/(27283): Loaded EGL implementation /system/lib//egl/libEGL_tegra_impl
04-17 11:07:20.569: I/(27283): Loading GLESv2 implementation /system/lib//egl/libGLESv2_tegra_impl
04-17 11:07:20.609: I/Choreographer(27283): Skipped 53 frames! The application may be doing too much work on its main thread.
04-17 11:07:21.059: W/dalvikvm(27283): disableGcForExternalAlloc: false
04-17 11:07:21.164: D/SoftKeyboardDetect(27283): Ignore this event
04-17 11:07:21.319: D/DroidGap(27283): onMessage(onPageStarted,file:///android_asset/www/login.html)
04-17 11:07:24.679: D/chromium(27283): Unknown chromium error: -6
04-17 11:07:24.689: D/Cordova(27283): onPageFinished(file:///android_asset/www/login.html)
04-17 11:07:24.689: D/Cordova(27283): Trying to fire onNativeReady
04-17 11:07:24.689: D/DroidGap(27283): onMessage(onNativeReady,null)
04-17 11:07:24.689: D/DroidGap(27283): onMessage(onPageFinished,file:///android_asset/www/login.html)
04-17 11:07:24.739: D/CordovaNetworkManager(27283): Connection Type: 3g
04-17 11:07:24.739: D/DroidGap(27283): onMessage(networkconnection,3g)
04-17 11:07:24.739: D/CordovaNetworkManager(27283): Connection Type: 3g
04-17 11:07:24.744: D/DroidGap(27283): onMessage(spinner,stop)
04-17 11:07:25.094: W/dalvikvm(27283): disableGcForExternalAlloc: false
04-17 11:07:26.699: D/ConnectPlugin(27283): init: Initializing plugin.
04-17 11:07:26.739: D/DroidGap(27283): onMessage(spinner,stop)
04-17 11:07:26.759: D/CordovaLog(27283): Cordova Facebook Connect plugin initialized successfully.
04-17 11:07:26.759: I/Web Console(27283): Cordova Facebook Connect plugin initialized successfully. at file:///android_asset/www/cdv-plugin-fb-connect.js:24
04-17 11:07:26.759: W/dalvikvm(27283): disableGcForExternalAlloc: false
04-17 11:07:28.004: D/CordovaLog(27283): Uncaught TypeError: Cannot call method 'split' of undefined
04-17 11:07:28.004: E/Web Console(27283): Uncaught TypeError: Cannot call method 'split' of undefined at file:///android_asset/www/cdv-plugin-fb-connect.js:39