簡體   English   中英

使用facebook connect插件進行phonegap時無法調用未定義的拆分

[英]cannot call split of undefined when using facebook connect plugin for phonegap

嘗試調用FB.login()函數時遇到問題。

堆棧跟蹤表明facebook connect插件已正確初始化,但是當我嘗試調用登錄功能時,我得到一個錯誤:無法在文件:/// android_asset / www / cdv-plugin-fb-上調用未定義的方法“ split” connect.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

好吧,沒關系,我讓它正常工作。 該線程中發現,我在FB.login()調用中使用了錯誤的作用域。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM