码迷,mamicode.com
首页 > 移动开发 > 详细

用友盟做的iOS qq三方登录 问题求解决

时间:2015-08-19 20:18:00      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:

//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版本低

 

用友盟做的iOS qq三方登录 问题求解决

标签:

原文地址:http://www.cnblogs.com/xiujia-948/p/4743052.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!