· 轉(zhuǎn)載請標(biāo)明出處:http://www.reibang.com/p/5ea1a0d9ee8a
1、登錄:微信妥凳、QQ竟贯、Sina,分享:微信逝钥、QQ屑那、Sina,支付:微信支付晌缘,支付寶支付齐莲;
2、集成一起的初衷是源于分享一直是原生寫的磷箕,登錄用友盟之類的选酗,回調(diào)這塊覺得麻煩,就統(tǒng)一集成了岳枷,統(tǒng)一回調(diào) URL:
appDelegate.m
3芒填、代碼結(jié)構(gòu)介紹:
4、開始項(xiàng)目
4.1空繁、第一步導(dǎo)入第三方 SDK 到項(xiàng)目殿衰,然后配置 info.plist,和 URL Schemes;QQ 和Wechat 注冊應(yīng)用一定要審核通過才有登錄能力盛泡,Sina 要設(shè)置 bundleID(bundleid 和項(xiàng)目不一樣登錄會(huì)報(bào)錯(cuò)) 和回調(diào) URL 才能正常登錄闷祥,添加私有庫;
01
cpmmand + v 到自己項(xiàng)目中
URL Schemes
4.2傲诵、QQ凯砍、WeChat、Sina 注冊應(yīng)用在 APPdelegate.m中的
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[[YZThirdManager thirdManager] registerApp:@"微博 APPID" WithType:YZRegisterTypeSina];
[[YZThirdManager thirdManager] registerApp:@"微信 APPID" WithType:YZRegisterTypeWechat];
[[YZThirdManager thirdManager] registerApp:@"QQ APPID" WithType:YZRegisterTypeQQ];
return YES;
}
4.3拴竹、YZThirdManager ?這個(gè)工具類主要做的就是分享悟衩、登錄、支付集成在一起栓拜,統(tǒng)一回到 URL座泳,代碼如下:
/********************
第三方管理工具類:
1惠昔、微信分享、登錄挑势、支付
2镇防、微博分享、登錄
3薛耻、QQ分享营罢、登錄
4、支付寶支付饼齿。
********************/
#import <Foundation/Foundation.h>
#import <TencentOpenAPI/QQApiInterface.h>
#import <TencentOpenAPI/TencentOAuth.h>
#import "WXApi.h"
#import "WeiboSDK.h"
#import <AlipaySDK/AlipaySDK.h>
/** 分享后的跳轉(zhuǎn)鏈接 */
extern NSString * const Share_URL;
/** 分享標(biāo)題 */
extern NSString * const Share_title;
/** 分享內(nèi)容 */
extern NSString * const Share_desc;
/** 分享顯示的圖片 */
extern NSString * const Share_imageData;
/**
分享類型
*/
typedef NS_ENUM(NSInteger, YZShareType) {
YZShareTypeWechatSession, // 分享到微信好友
YZShareTypeWechatTimeLine, // 分享到微信朋友圈
YZShareTypeQQ, // 分享到QQ
YZShareTypeSina // 分享到sina微博
};
/**
注冊類型
*/
typedef NS_ENUM(NSInteger, YZRegisterType) {
YZRegisterTypeWechat, // 微信
YZRegisterTypeQQ, // QQ
YZRegisterTypeSina // sina微博
};
/**
登錄類型
*/
typedef NS_ENUM(NSInteger, YZOAuthType) {
YZOAuthTypeWechat, // 微信
YZOAuthTypeQQ, // QQ
YZOAuthTypeSina // sina微博
};
/**
協(xié)議
*/
@protocol YZThirdManagerDelegate <NSObject>
@optional
#pragma mark 第三方登錄回調(diào)
/**
WeChat 登錄成功
@param userDict WeChat 用戶信息
*/
- (void)wechat_loginSuccess:(NSDictionary *)userDict;
/**
Sina 登錄成功
@param userDict Sina 用戶信息
*/
- (void)sina_loginSuccess:(NSDictionary *)userDict;
/**
QQ 登錄成功
@param userDict QQ 用戶信息
*/
- (void)tencent_loginSuccess:(NSDictionary *)userDict;
#pragma mark 第三方分享回調(diào)
/**
微信分享后收到微信的響應(yīng)
分享是否成功 需要判斷 errCode 屬性 WXErrCode
@param response 響應(yīng)消息
*/
- (void)wechat_shareDidReceiveResponse:(BaseResp *)response;
/**
QQ分享后收到QQ的響應(yīng)
分享是否成功 需要判斷 result 屬性, QQApiSendResultCode
@param response 響應(yīng)消息
*/
- (void)tencent_shareDidReceiveResponse:(SendMessageToQQResp *)response;
/**
微博分享后收到微博的響應(yīng)
分享是否成功 需要判斷 statusCode 碼 WeiboSDKResponseStatusCode
@param response 響應(yīng)消息
*/
- (void)sina_shareDidReceiveResponse:(WBBaseResponse *)response;
#pragma mark 支付回調(diào)
/**
微信支付后收到微信的響應(yīng),支付是否成功需要判斷 errCode 屬性 WXErrCode
@param response 響應(yīng)消息
*/
- (void)wechat_PayDidReceiveResponse:(PayResp *)response;
/**
支付寶支付收到支付寶的響應(yīng)蝙搔,支付是否成功需要判斷 resultDic的key resultStatus = 9000 成功
@param resultDic 結(jié)果信息
*/
- (void)aliPay_DidReceiveResponse:(NSDictionary *)resultDic;
@end
@interface YZThirdManager : NSObject <WXApiDelegate,WeiboSDKDelegate,TencentSessionDelegate, QQApiInterfaceDelegate>
@property (nonatomic, weak) id<YZThirdManagerDelegate> third_delegate;
+ (instancetype)thirdManager;
/**
注冊應(yīng)用
@param appid 微信和QQ請傳入appid,微博傳入appkey
@param type 分享類型
*/
- (void)registerApp:(NSString *)appid WithType:(YZRegisterType)type;
/**
分享到第三方,示例:@{Share_URL:@"http://www.baidu.com",Share_title:@"測試分享",Share_imageData:UIImageJPEGRepresentation(img,1),Share_desc:@"文本內(nèi)容"};
@param dict 分享的內(nèi)容
@param type 分享的類型
*/
- (void)shareWithDictionary:(NSDictionary *)dict shareType:(YZShareType)type;
/**
第三方登錄
@param type 登錄的類型
*/
- (void)thirdLoginWithOAuthType:(YZOAuthType)type;
/**
第三方 URL 回調(diào)
*/
- (void)handleOpenURL:(NSURL *)url;
/**
微信支付缕溉,order 的 key 是按照 PayReq 的屬性設(shè)置
@param order 訂單信息
*/
- (void)thirdPayWechat:(NSDictionary *)order;
/**
支付寶支付
@param sign 簽名字符串
*/
- (void)thirdAliPaySign:(NSString *)sign;
@end
//
// YZThirdManager.m
// ECGoudeli
//
// Created by Leaf on 2017/8/10.
// Copyright ? 2017年 Leaf. All rights reserved.
//
/** 下面信息是需要去對應(yīng)第三方開發(fā)平臺(tái)注冊應(yīng)用獲得 */
#define WX_APP_ID @"微信 APP_ID"
#define WX_APP_AppSecret @"微信 AppSecret"
#define QQ_APP_ID @"QQ APP_ID"
#define QQ_APP_KEY @"QQ APP_KEY"
#define WB_APP_KEY @"微博 APP_KEY"
#define WB_APP_Secret @"微博 APP_Secret"
#define WB_REDIRECT_URL @"http://www.sina.com"
NSString * const Share_URL = @"url";
NSString * const Share_title = @"title";
NSString * const Share_desc = @"desc";
NSString * const Share_imageData = @"imageData";
#import "YZThirdManager.h"
@interface YZThirdManager ()<NSURLSessionDelegate>
{
TencentOAuth *_tencentOAuth;
NSMutableArray *_permissionArray; // QQ 需要的權(quán)限
NSData *_imageData;
NSString *_title;
NSString *_description;
NSString *_urlString;
}
@property (nonatomic, strong) AFHTTPSessionManager *manager;
@end
@implementation YZThirdManager
+ (instancetype)thirdManager {
static id instance;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[self alloc] init];
});
return instance;
}
// 注冊第三方
- (void)registerApp:(NSString *)appid WithType:(YZRegisterType)type {
switch (type) {
case YZRegisterTypeWechat:
[WXApi registerApp:appid];
break;
case YZRegisterTypeQQ:
_tencentOAuth = [[TencentOAuth alloc]initWithAppId:appid andDelegate:self];
break;
case YZRegisterTypeSina:
[WeiboSDK registerApp:appid];
break;
}
}
#pragma mark - Share: Wechat & Sina & QQ
- (void)shareWithDictionary:(NSDictionary *)dict shareType:(YZShareType)type {
_title = dict[Share_title];
_urlString = dict[Share_URL];
_description = dict[Share_desc];
_imageData = dict[Share_imageData];
if (type == YZShareTypeQQ) {
[self shareToQQ];
}else if (type == YZShareTypeWechatSession || type == YZShareTypeWechatTimeLine){
[self shareToWeChatWithWechatType:type];
}else if (type == YZShareTypeSina){
[self shareToWeibo];
}
}
/**
分享到wechat
@param wechatType 分享到微信的類型
*/
- (void)shareToWeChatWithWechatType:(YZShareType)wechatType{
SendMessageToWXReq *req = [[SendMessageToWXReq alloc] init];
WXMediaMessage *message = [WXMediaMessage message];
if (_urlString.length) {
WXWebpageObject *web = [WXWebpageObject object];
web.webpageUrl = _urlString;
message.mediaObject = web;
} else {
WXImageObject *image = [WXImageObject object];
image.imageData = _imageData;
message.mediaObject = image;
req.bText = NO;
}
message.title = _title ?: @"";
message.description = _description?:@"";
// 微信分享圖片大小不能超過 32K
[message setThumbImage:[UIImage imageWithData:_imageData]];
// 分享給好友
if (wechatType == YZShareTypeWechatSession) {
req.scene = WXSceneSession;
}
// 分享到朋友圈
if (wechatType == YZShareTypeWechatTimeLine) {
message.title = _description;
req.scene = WXSceneTimeline;
}
req.message = message;
[WXApi sendReq:req];
}
/**
* 分享到微博
*/
-(void)shareToWeibo{
WBMessageObject *message = [WBMessageObject message];
WBImageObject *imageObject = [WBImageObject object];
imageObject.imageData = _imageData;
message.imageObject = imageObject;
message.text = [NSString stringWithFormat:@"%@%@",_title,_urlString] ;
WBSendMessageToWeiboRequest *request = [WBSendMessageToWeiboRequest requestWithMessage:message authInfo:nil access_token:nil];
request.userInfo = nil;
[WeiboSDK sendRequest:request];
}
/**
* 分享到QQ
*/
-(void)shareToQQ{
NSURL *url = [NSURL URLWithString:_urlString];
QQBaseReq *request = nil;
if (_urlString.length) {
QQApiNewsObject *news = [QQApiNewsObject objectWithURL:url title:_title description:_description previewImageData:_imageData];
request = [SendMessageToQQReq reqWithContent:news];
} else {
QQApiImageObject *image = [[QQApiImageObject alloc] initWithData:_imageData previewImageData:_imageData title:_title description:_description];
request = [SendMessageToQQReq reqWithContent:image];
}
[QQApiInterface sendReq:request];
}
#pragma mark - OAuth: wechat & QQ & sina
-(void)thirdLoginWithOAuthType:(YZOAuthType)type {
if (type == YZOAuthTypeQQ) {
_permissionArray = [NSMutableArray arrayWithArray:@[/** 移動(dòng)端獲取用戶信息 */
kOPEN_PERMISSION_GET_SIMPLE_USER_INFO,
]];
[_tencentOAuth authorize:_permissionArray inSafari:NO];
}else if (type == YZOAuthTypeWechat) {
SendAuthReq *req = [[SendAuthReq alloc] init];
req.scope = @"snsapi_userinfo";
req.state = @"App";
[WXApi sendReq:req];
}else if (type == YZOAuthTypeSina) {
WBAuthorizeRequest *request = [WBAuthorizeRequest request];
//回調(diào)地址與 新浪微博開放平臺(tái)中 我的應(yīng)用 --- 應(yīng)用信息 -----高級應(yīng)用 -----授權(quán)設(shè)置 ---應(yīng)用回調(diào)中的url保持一致就好了
request.redirectURI = WB_REDIRECT_URL;
[WeiboSDK sendRequest:request];
}
}
#pragma mark - WXApiDelegate & QQApiInterfaceDelegate & WeiboSDKDelegate
/*
1、處理來至QQ的響應(yīng)
2吃型、處理來至微信的響應(yīng)
*/
- (void)onResp:(BaseResp *)resp {
if ([resp isKindOfClass:[BaseResp class]]) {
// 處理來自微信的響應(yīng)
if ([resp isKindOfClass:[SendAuthResp class]]) {
if (resp.errCode == WXSuccess) {
SendAuthResp *resp2 = (SendAuthResp *)resp;
[self getWechatOpenidAndToken:resp2.code];
}else{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"登錄失敗" message:[NSString stringWithFormat:@"%@",resp.errStr] delegate:self cancelButtonTitle:nil otherButtonTitles:@"確定", nil];
[alert show];
}
}else if ([resp isKindOfClass:[SendMessageToWXResp class]]) {
DebugLog(@"微信分享了");
if ([self.third_delegate respondsToSelector:@selector(wechat_shareDidReceiveResponse:)]) {
[self.third_delegate wechat_shareDidReceiveResponse:resp];
}
}else if ([resp isKindOfClass:[PayResp class]]) {
DebugLog(@"微信支付");
if ([self.third_delegate respondsToSelector:@selector(wechat_PayDidReceiveResponse:)]) {
[self.third_delegate wechat_PayDidReceiveResponse:(PayResp *)resp];
}
}
}else if ([resp isKindOfClass:[QQBaseResp class]]) {
// 處理來自QQ的響應(yīng)
if ([resp isKindOfClass:[SendMessageToQQResp class]]) {
DebugLog(@"share:QQ分享");
if ([self.third_delegate respondsToSelector:@selector(tencent_shareDidReceiveResponse:)]) {
[self.third_delegate tencent_shareDidReceiveResponse:(SendMessageToQQResp *)resp];
}
}
}
}
/*
1证鸥、處理來至QQ的請求
2、處理來至微信的請求
*/
- (void)onReq:(BaseReq *)req {
if ([req isKindOfClass:[BaseReq class]]) {
// 處理來自微信的請求
}else if ([req isKindOfClass:[QQBaseReq class]]) {
// 處理來自QQ的請求
}
}
/**
處理QQ在線狀態(tài)的回調(diào)
*/
- (void)isOnlineResponse:(NSDictionary *)response{
}
/**
收到一個(gè)來自微博客戶端程序的請求
*/
- (void)didReceiveWeiboRequest:(WBBaseRequest *)request{
DebugLog(@"request %@",request);
}
/**
收到一個(gè)來自微博客戶端程序的響應(yīng)
*/
- (void)didReceiveWeiboResponse:(WBBaseResponse *)response{
if ([response isKindOfClass:[WBSendMessageToWeiboResponse class]]) {
DebugLog(@"share:微博分享");
if ([self.third_delegate respondsToSelector:@selector(sina_shareDidReceiveResponse:)]) {
[self.third_delegate sina_shareDidReceiveResponse:response];
}
}else if ([response isKindOfClass:[WBAuthorizeResponse class]]) {
DebugLog(@"微博登錄");
if (response.statusCode == WeiboSDKResponseStatusCodeSuccess) {
NSString *uid = [(WBAuthorizeResponse *)response userID];
NSString *token = [(WBAuthorizeResponse *)response accessToken];
[self getSinaUserInfo:uid token:token];
}else {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"登錄失敗" message:[NSString stringWithFormat:@"statusCode: %zd",response.statusCode] delegate:self cancelButtonTitle:nil otherButtonTitles:@"確定", nil];
[alert show];
}
}
}
#pragma mark - TencentLoginDelegate
//委托
- (void)tencentDidLogin
{
[_tencentOAuth getUserInfo];
}
- (void)getUserInfoResponse:(APIResponse *)response
{
if (response.retCode == URLREQUEST_SUCCEED) {
NSDictionary *userDict = @{@"third_id" : [_tencentOAuth openId],
@"third_name" : [response.jsonResponse valueForKeyPath:@"nickname"],
@"third_image" : [response.jsonResponse valueForKeyPath:@"figureurl_qq_2"],
@"access_token": [_tencentOAuth accessToken]};
if ([self.third_delegate respondsToSelector:@selector(tencent_loginSuccess:)]) {
[self.third_delegate tencent_loginSuccess:userDict];
}
DebugLog(@"userDict %@",userDict);
} else {
DebugLog(@"登錄失敗!");
}
}
- (void)tencentDidLogout {
}
/**
* 登錄失敗后的回調(diào)
* param cancelled 代表用戶是否主動(dòng)退出登錄
*/
- (void)tencentDidNotLogin:(BOOL)cancelled {
}
- (void)tencentDidNotNetWork {
}
#pragma mark - 獲取第三方用戶信息
// 獲取 Sina 的用戶信息
- (void)getSinaUserInfo:(NSString *)uid token:(NSString *)token {
NSString *urlStr =[NSString stringWithFormat:@"https://api.weibo.com/2/users/show.json?uid=%@&access_token=%@&source=%@",uid,token,WB_APP_KEY];
__weak typeof(self) weakself = self;
[self.manager GET:urlStr parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
NSDictionary *userDict = @{
@"third_id" : [dic valueForKeyPath:@"idstr"],
@"third_name" : [dic valueForKeyPath:@"screen_name"],
@"third_image": [dic valueForKeyPath:@"avatar_hd"],
@"access_token":token
};
if ([weakself.third_delegate respondsToSelector:@selector(sina_loginSuccess:)]) {
[weakself.third_delegate sina_loginSuccess:userDict];
}
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
DebugLog(@"error %@",error);
}];
}
//通過 appid secret 認(rèn)證code . 來發(fā)送獲取 access_token的請求
- (void)getWechatOpenidAndToken:(NSString *)code {
NSString *urlStr = [NSString stringWithFormat:@"https://api.weixin.qq.com/sns/oauth2/access_token?appid=%@&secret=%@&code=%@&grant_type=authorization_code",WX_APP_ID,WX_APP_AppSecret,code];
__weak typeof(self) weakself = self;
[self.manager GET:urlStr parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
/*
access_token 接口調(diào)用憑證
expires_in access_token接口調(diào)用憑證超時(shí)時(shí)間勤晚,單位(秒)
refresh_token 用戶刷新access_token
openid 授權(quán)用戶唯一標(biāo)識
scope 用戶授權(quán)的作用域枉层,使用逗號(,)分隔
unionid 當(dāng)且僅當(dāng)該移動(dòng)應(yīng)用已獲得該用戶的userinfo授權(quán)時(shí),才會(huì)出現(xiàn)該字段
*/
NSString* accessToken=[dic valueForKey:@"access_token"];
NSString* openID=[dic valueForKey:@"openid"];
[weakself getWechatUserInfo:accessToken openid:openID];
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
DebugLog(@"error %@",error.localizedFailureReason);
}];
}
// 通過 access_token 獲取微信用戶信息
- (void)getWechatUserInfo:(NSString *)token openid:(NSString *)openid {
NSString *urlStr = [NSString stringWithFormat:@"https://api.weixin.qq.com/sns/userinfo?access_token=%@&openid=%@",token,openid];
__weak typeof(self) weakself = self;
[self.manager GET:urlStr parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSDictionary *dic = (NSDictionary *)[NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
NSDictionary *userDict = @{
@"way" : @"1", // 登錄方式:微信
@"openid" : openid, // 用戶唯一標(biāo)識
@"headimgurl": dic[@"headimgurl"], // 頭像URL
@"nickname" : dic[@"nickname"], // 昵稱
@"sex" : [dic[@"sex"] stringValue], // 性別
@"country" : dic[@"country"], // 國家
@"province" : dic[@"province"], // 省份
@"city" : dic[@"city"], // 城市
@"language" : dic[@"language"] // 語言
};
if ([weakself.third_delegate respondsToSelector:@selector(wechat_loginSuccess:)]) {
[weakself.third_delegate wechat_loginSuccess:userDict];
}
DebugLog(@"userDict = %@",userDict);
}failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
DebugLog(@"error %ld",(long)error.code);
}];
}
#pragma mark - Wechat Pay & AliPay
- (void)thirdPayWechat:(NSDictionary *)order {
PayReq *payOrder = [[PayReq alloc] init];
payOrder.openID = [order objectForKey:@"openID"];
payOrder.partnerId = [order objectForKey:@"partnerId"];
payOrder.prepayId = [order objectForKey:@"prepayId"];
payOrder.package = [order objectForKey:@"package"];
payOrder.nonceStr = [order objectForKey:@"nonceStr"];
payOrder.timeStamp = (UInt32)[[order objectForKey:@"timeStamp"] integerValue];
payOrder.sign = [order objectForKey:@"sign"];
if (![WXApi sendReq:payOrder]) {
DebugLog(@"支付出錯(cuò)赐写,請稍后再試");
}
}
- (void)thirdAliPaySign:(NSString *)sign {
__weak typeof(self) weakself = self;
[[AlipaySDK defaultService] payOrder:sign fromScheme:@"com.kyx.eduParents" callback:^(NSDictionary *resultDic) {
[weakself didReceiveAliPayRequest:resultDic];
}];
}
#pragma mark - Private
- (void)didReceiveAliPayRequest:(NSDictionary *)resultDic {
if ([self.third_delegate respondsToSelector:@selector(aliPay_DidReceiveResponse:)]) {
[self.third_delegate aliPay_DidReceiveResponse:resultDic];
}
}
#pragma mark - 第三方請求結(jié)果URL回調(diào)
-(void)handleOpenURL:(NSURL *)url {
__weak typeof(self) weakself = self;
if ([url.scheme isEqualToString:WX_APP_ID]) {
[WXApi handleOpenURL:url delegate:self];
} else if ([url.scheme isEqualToString:[NSString stringWithFormat:@"tencent%@",QQ_APP_ID]]) {
[QQApiInterface handleOpenURL:url delegate:self];
[TencentOAuth HandleOpenURL:url];
}else if ([url.scheme isEqualToString:[NSString stringWithFormat:@"wb%@",WB_APP_KEY]]) {
[WeiboSDK handleOpenURL:url delegate:self];
} else if ([url.host isEqualToString:@"safepay"]) {
[[AlipaySDK defaultService] processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) {
// 處理支付寶支付結(jié)果
[weakself didReceiveAliPayRequest:resultDic];
}];
} else if ([url.host isEqualToString:@"alipayclient"]) {
[[AlipaySDK defaultService] processOrderWithPaymentResult:url standbyCallback:^(NSDictionary *resultDic) {
// 處理支付寶支付結(jié)果
[weakself didReceiveAliPayRequest:resultDic];
}];
}
}
#pragma mark - 懶加載
-(AFHTTPSessionManager *)manager {
if (_manager == nil) {
_manager = [AFHTTPSessionManager manager];
_manager.requestSerializer = [AFJSONRequestSerializer serializer];//請求
_manager.responseSerializer = [AFHTTPResponseSerializer serializer];//響應(yīng)
_manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/html",@"application/json", @"text/json",@"text/plain", nil];
}
return _manager;
}
@end
5鸟蜡、登錄成功通過代理回調(diào)返回用戶信息出來:
6、上面的 YZThirdManager 類的代碼已經(jīng)貼出來了挺邀,如果要demo揉忘,下面回復(fù)郵箱地址