我正在使用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