我正在使用phonegap cordova-1.5.0.js和jar。 並使用PhoneGap的-插件科爾多瓦與jsOAtuh.1.3.3.js
未被捕獲的模塊xhr未找到cordova-1.5.0.js
我收到錯誤消息:
「未捕獲模塊XHR不是文件中找到:///android_asset/www/cordova-1.5。 0.js「
每當我嘗試創建OAuth對象。
我有以下幾點參考: https://github.com/bytespider/jsoauth
這裏是我的代碼。
var config_google={
var config_google={
consumerKey: "{removed}",
consumerSecret: "{removed}",
requestTokenUrl: "https://www.google.com/accounts/OAuthGetRequestToken?scope={removed}",
authorizationUrl:"https://www.google.com/accounts/OAuthAuthorizeToken",
accessTokenUrl:"https://www.google.com/accounts/OAuthGetAccessToken"
};
function authservice(service){
//alert(service);
curfunc = "authservice";
str_service = service;
if (service === 'google'){
oauth = new OAuth(config_google);
}else if....
........
}
我以前用phonegap-1.4.1.js(以前的版本)的代碼,它的工作原理。我在1.4.1和1.5.0上搜索了xhr,他們都沒有xhr,但是有一些註釋引用。不完全確定爲什麼改變1.5.0,它會禁用代碼。我需要使用1.5.0是因爲我需要使用childbrowser插件。
你能指出我正確的方向嗎?
在此先感謝。
謝謝JesterXL也Rob G. jsOAuth的原作者。你們很生氣。 :)感謝您解決我的問題。 – 2012-04-04 04:50:55