在新浪微博开放平台创建了移动应用,也审核通过了。
回调地址都填的是http://open.weibo.com/apps/1060430553/privilege/oauth
使用如下代码:
if (share) {
if (share.authenticated) {
shareMessage(share, ids[i - 1].ex , artid);
} else {
share.authorize(function() {
alert("3:"+JSON.stringify(share));
shareMessage(share, ids[i - 1].ex ,artid);
}, function(e) {
alert("4:"+"认证授权失败:" + e.code + " - " + e.message);
console.log("认证授权失败:" + e.code + " - " + e.message);
});
alert("5:"+JSON.stringify(share));
}
} else {
//无法获取分享服务,请检查manifest.json中分享插件参数配置,并重新打包
mui.toast("无法获取分享服务")
}
结果只有执行到这里alert("5:"+JSON.stringify(share)); 其他alert都没有执行,也没提示登录授权
0 个回复