标签:
//QQ登录
- (void)qqBtnClick:(UIButton *)btn
{
NSString *platformName = [UMSocialSnsPlatformManager getSnsPlatformString:UMSocialSnsTypeMobileQQ];
UMSocialSnsPlatform *snsPlatform = [UMSocialSnsPlatformManager getSocialPlatformWithName:UMShareToQQ];
snsPlatform.loginClickHandler(self,[UMSocialControllerService defaultControllerService],YES,^(UMSocialResponseEntity *response){
NSLog(@"login response is %@",response);
//获取微博用户名、uid、token等
if (response.responseCode == UMSResponseCodeSuccess) {
UMSocialAccountEntity *snsAccount = [[UMSocialAccountManager socialAccountDictionary] valueForKey:platformName];
NSLog(@"username is %@, uid is %@, token is %@,iconUrl is %@",snsAccount.userName,snsAccount.usid,snsAccount.accessToken,snsAccount.iconURL)
}
});
}
//实现的回调
-(void)didFinishGetUMSocialDataInViewController:(UMSocialResponseEntity *)response
{
[[UMSocialDataService defaultDataService] requestSnsInformation:UMShareToQQ completion:^(UMSocialResponseEntity *response){
NSLog(@"SnsInformation is %@",response.data);
}];
}
总是提示QQ版本低
标签:
原文地址:http://www.cnblogs.com/xiujia-948/p/4743052.html