Skip to content

Commit 3a37999

Browse files
committed
更新umeng sdk - iOS9 分享到 sina 会崩溃的 bug
1 parent 23eaa28 commit 3a37999

File tree

54 files changed

+1882
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1882
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// UMSocialSinaSSOHandler.h
3+
// SocialSDK
4+
//
5+
// Created by Gavin Ye on 3/27/15.
6+
// Copyright (c) 2015 Umeng. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
/**
12+
使用最新版本的新浪微博官方SDK处理新浪微博SSO授权
13+
14+
*/
15+
@interface UMSocialSinaSSOHandler : NSObject
16+
17+
/**
18+
设置使用最新新浪微博SDK来处理SSO授权(通过客户端设置appkey进行访问)
19+
20+
@param appKey 新浪App Key
21+
@param redirectURL 回调URL
22+
23+
*/
24+
25+
+(void)openNewSinaSSOWithAppKey:(NSString *)appKey
26+
RedirectURL:(NSString *)redirectURL;
27+
/**
28+
设置使用最新新浪微博SDK来处理SSO授权
29+
30+
@param redirectURL 回调URL
31+
32+
*/
33+
+(void)openNewSinaSSOWithRedirectURL:(NSString *)redirectURL;
34+
35+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
//
2+
// WBHttpRequest+WeiboGame.h
3+
// WeiboSDK
4+
//
5+
// Created by insomnia on 15/3/11.
6+
// Copyright (c) 2015年 SINA iOS Team. All rights reserved.
7+
//
8+
9+
#import "WBHttpRequest.h"
10+
11+
@interface WBHttpRequest (WeiboGame)
12+
13+
/*!
14+
@method
15+
16+
@abstract
17+
新增游戏对象。 在http://open.weibo.com/wiki/%E6%B8%B8%E6%88%8F%E6%8E%A5%E5%8F%A3 中有关于该接口的细节说明。
18+
19+
@param userID 当前授权用户的uid
20+
21+
@param accessToken 当前授权用户的accessToken
22+
23+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
24+
25+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
26+
27+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
28+
*/
29+
+ (WBHttpRequest *)addGameObject:(NSString*)userID
30+
withAccessToken:(NSString*)accessToken
31+
andOtherProperties:(NSDictionary*)otherProperties
32+
queue:(NSOperationQueue*)queue
33+
withCompletionHandler:(WBRequestHandler)handler;
34+
35+
/*!
36+
@method
37+
38+
@abstract
39+
游戏成就对象入库/更新。 在http://open.weibo.com/wiki/%E6%B8%B8%E6%88%8F%E6%8E%A5%E5%8F%A3 中有关于该接口的细节说明。
40+
41+
@param userID 当前授权用户的uid
42+
43+
@param accessToken 当前授权用户的accessToken
44+
45+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
46+
47+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
48+
49+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
50+
*/
51+
+ (WBHttpRequest *)addGameAchievementObject:(NSString*)userID
52+
withAccessToken:(NSString*)accessToken
53+
andOtherProperties:(NSDictionary*)otherProperties
54+
queue:(NSOperationQueue*)queue
55+
withCompletionHandler:(WBRequestHandler)handler;
56+
57+
/*!
58+
@method
59+
60+
@abstract
61+
用户获得游戏成就关系入库/更新。 在http://open.weibo.com/wiki/%E6%B8%B8%E6%88%8F%E6%8E%A5%E5%8F%A3 中有关于该接口的细节说明。
62+
63+
@param userID 当前授权用户的uid
64+
65+
@param accessToken 当前授权用户的accessToken
66+
67+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
68+
69+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
70+
71+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
72+
*/
73+
+ (WBHttpRequest *)addGameAchievementGain:(NSString*)userID
74+
withAccessToken:(NSString*)accessToken
75+
andOtherProperties:(NSDictionary*)otherProperties
76+
queue:(NSOperationQueue*)queue
77+
withCompletionHandler:(WBRequestHandler)handler;
78+
79+
/*!
80+
@method
81+
82+
@abstract
83+
用户游戏得分关系入库/更新。 在http://open.weibo.com/wiki/%E6%B8%B8%E6%88%8F%E6%8E%A5%E5%8F%A3 中有关于该接口的细节说明。
84+
85+
@param userID 当前授权用户的uid
86+
87+
@param accessToken 当前授权用户的accessToken
88+
89+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
90+
91+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
92+
93+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
94+
*/
95+
+ (WBHttpRequest *)addGameScoreGain:(NSString*)userID
96+
withAccessToken:(NSString*)accessToken
97+
andOtherProperties:(NSDictionary*)otherProperties
98+
queue:(NSOperationQueue*)queue
99+
withCompletionHandler:(WBRequestHandler)handler;
100+
101+
102+
/*!
103+
@method
104+
105+
@abstract
106+
读取玩家游戏分数。 在http://open.weibo.com/wiki/%E6%B8%B8%E6%88%8F%E6%8E%A5%E5%8F%A3 中有关于该接口的细节说明。
107+
108+
@param userID 当前授权用户的uid
109+
110+
@param accessToken 当前授权用户的accessToken
111+
112+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
113+
114+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
115+
116+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
117+
*/
118+
+ (WBHttpRequest *)requestForGameScore:(NSString*)userID
119+
withAccessToken:(NSString*)accessToken
120+
andOtherProperties:(NSDictionary*)otherProperties
121+
queue:(NSOperationQueue*)queue
122+
withCompletionHandler:(WBRequestHandler)handler;
123+
124+
/*!
125+
@method
126+
127+
@abstract
128+
读取玩家互粉好友游戏分数。 在http://open.weibo.com/wiki/%E6%B8%B8%E6%88%8F%E6%8E%A5%E5%8F%A3 中有关于该接口的细节说明。
129+
130+
@param userID 当前授权用户的uid
131+
132+
@param accessToken 当前授权用户的accessToken
133+
134+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
135+
136+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
137+
138+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
139+
*/
140+
+ (WBHttpRequest *)requestForFriendsGameScore:(NSString*)userID
141+
withAccessToken:(NSString*)accessToken
142+
andOtherProperties:(NSDictionary*)otherProperties
143+
queue:(NSOperationQueue*)queue
144+
withCompletionHandler:(WBRequestHandler)handler;
145+
146+
/*!
147+
@method
148+
149+
@abstract
150+
读取玩家获取成就列表。 在http://open.weibo.com/wiki/%E6%B8%B8%E6%88%8F%E6%8E%A5%E5%8F%A3 中有关于该接口的细节说明。
151+
152+
@param userID 当前授权用户的uid
153+
154+
@param accessToken 当前授权用户的accessToken
155+
156+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
157+
158+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
159+
160+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
161+
*/
162+
+ (WBHttpRequest *)requestForGameAchievementGain:(NSString*)userID
163+
withAccessToken:(NSString*)accessToken
164+
andOtherProperties:(NSDictionary*)otherProperties
165+
queue:(NSOperationQueue*)queue
166+
withCompletionHandler:(WBRequestHandler)handler;
167+
168+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
//
2+
// WBHttpRequest+WeiboShare.h
3+
// WeiboSDK
4+
//
5+
// Created by DannionQiu on 14/10/31.
6+
// Copyright (c) 2014年 SINA iOS Team. All rights reserved.
7+
//
8+
9+
#import "WBHttpRequest.h"
10+
11+
@class WBImageObject;
12+
13+
@interface WBHttpRequest (WeiboShare)
14+
15+
/*!
16+
@method
17+
18+
@abstract
19+
获得当前授权用户的微博id列表。
20+
21+
@param userID 当前授权用户的uid
22+
23+
@param accessToken 当前授权用户的accessToken
24+
25+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
26+
27+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
28+
29+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
30+
*/
31+
+ (WBHttpRequest *)requestForStatusIDsFromCurrentUser:(NSString*)userID
32+
withAccessToken:(NSString*)accessToken
33+
andOtherProperties:(NSDictionary*)otherProperties
34+
queue:(NSOperationQueue*)queue
35+
withCompletionHandler:(WBRequestHandler)handler;
36+
37+
/*!
38+
@method
39+
40+
@abstract
41+
转发微博。转发微博id所对应的微博。
42+
43+
@param statusID 微博id,微博的唯一标识符。
44+
45+
@param text 添加的转发文本,内容不超过140个汉字,不填则默认为“转发微博”。
46+
47+
@param accessToken 当前授权用户的accessToken
48+
49+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
50+
51+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
52+
53+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
54+
*/
55+
+ (WBHttpRequest *)requestForRepostAStatus:(NSString*)statusID
56+
repostText:(NSString*)text
57+
withAccessToken:(NSString*)accessToken
58+
andOtherProperties:(NSDictionary*)otherProperties
59+
queue:(NSOperationQueue*)queue
60+
withCompletionHandler:(WBRequestHandler)handler;
61+
62+
/*!
63+
@method
64+
65+
@abstract
66+
发表一个微博(无图或者带一张图片的微博)。
67+
68+
@param statusText 要发布的微博文本内容,内容不超过140个汉字。
69+
70+
@param imageObject 要上传的图片,仅支持JPEG、GIF、PNG格式,图片大小小于5M。这个参数可为nil。由于只能传一张图片,若imageObject和url都有值,请看@caution。
71+
72+
@param url 图片的URL地址,必须以http开头。这个参数可为nil,由于只能传一张图片,若imageObject和url都有值,请看@caution。
73+
74+
@param accessToken 当前授权用户的accessToken
75+
76+
@param otherProperties 一个NSDictionary字典,承载任意想额外添加到请求中的参数。
77+
78+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
79+
80+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
81+
82+
@caution 注意,如果参数imageObject和url都有值,则发布带有imageObject所对应的图片,忽略url所对应的图片。
83+
*/
84+
+ (WBHttpRequest *)requestForShareAStatus:(NSString*)statusText
85+
contatinsAPicture:(WBImageObject*)imageObject
86+
orPictureUrl:(NSString*)url
87+
withAccessToken:(NSString*)accessToken
88+
andOtherProperties:(NSDictionary*)otherProperties
89+
queue:(NSOperationQueue*)queue
90+
withCompletionHandler:(WBRequestHandler)handler;
91+
92+
93+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//
2+
// WBHttpRequest+WeiboToken.h
3+
// WeiboSDK
4+
//
5+
// Created by DannionQiu on 14/11/6.
6+
// Copyright (c) 2014年 SINA iOS Team. All rights reserved.
7+
//
8+
9+
#import "WBHttpRequest.h"
10+
11+
@interface WBHttpRequest (WeiboToken)
12+
/*!
13+
@method
14+
15+
@abstract
16+
使用RefreshToken去换取新的身份凭证AccessToken.
17+
18+
@discussion
19+
在SSO授权登录后,服务器会下发有效期为7天的refreshToken以及有效期为1天的AccessToken。
20+
当有效期为1天的AccessToken过期时,可以调用该接口带着refreshToken信息区换取新的AccessToken。
21+
@param refreshToken refreshToken
22+
23+
@param queue 指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
24+
25+
@param handler 完成请求后会回调handler,处理完成请求后的逻辑。
26+
*/
27+
+ (WBHttpRequest *)requestForRenewAccessTokenWithRefreshToken:(NSString*)refreshToken
28+
queue:(NSOperationQueue*)queue
29+
withCompletionHandler:(WBRequestHandler)handler;
30+
@end

0 commit comments

Comments
 (0)