

English
For more information, please refer to the official Sina Weibo document Mobile Application Access
Notice
sinaweibo
uni.login({
provider: 'sinaweibo',
success: function (loginRes) {
// login successful
uni.getUserInfo({
provider: 'sinaweibo',
success: function(info) {
// Obtain user information successfully, info.authResult saves user information
}
})
},
fail: function (err) {
// 登录授权失败
// err.code is the error code
}
});
var weiboOauth = null;
plus.oauth.getServices(function(services) {
for (var i in services) {
var service = services[i];
// 获取新浪微博登录对象
if (service.id == 'sinaweibo') {
weiboOauth = service;
break;
}
}
weiboOauth.login( function(oauth){
// 授权成功,weiboOauth.authResult 中保存授权信息
}, function(err) {
// 登录授权失败
// err.code is the error code
})
}, function(err) {
// Failed to get services
})