TencentOpenAPI iOS SDK  v1.4
QQ互联开放平台 iOS SDK
 全部  文件 函数 变量 类型定义 枚举 枚举值 属性 
TencentOAuth.h
浏览该文件的文档.
1 
2 
3 
4 
5 
6 
7 
8 
9 #import "sdkdef.h"
10 #import <UIKit/UIKit.h>
11 
12 @protocol TencentSessionDelegate;
13 @protocol TencentLoginDelegate;
14 
20 @interface TencentOAuth : NSObject
21 {
22  NSMutableDictionary* _apiRequests;
23  NSString* _accessToken;
24  NSDate* _expirationDate;
25  id<TencentSessionDelegate> _sessionDelegate;
26  NSString* _localAppId;
27  NSString* _openId;
28  NSString* _redirectURI;
29  NSArray* _permissions;
30 }
31 
33 @property(nonatomic, copy) NSString* accessToken;
34 
36 @property(nonatomic, copy) NSDate* expirationDate;
37 
39 @property(nonatomic, assign) id<TencentSessionDelegate> sessionDelegate;
40 
42 @property(nonatomic, copy) NSString* localAppId;
43 
45 @property(nonatomic, copy) NSString* openId;
46 
48 @property(nonatomic, copy) NSString* redirectURI;
49 
51 @property(nonatomic, retain) NSString* appId;
52 
59 - (id)initWithAppId:(NSString *)appId
60  andDelegate:(id<TencentSessionDelegate>)delegate;
61 
67 - (BOOL)authorize:(NSArray *)permissions
68  inSafari:(BOOL)bInSafari;
69 
76 - (BOOL)authorize:(NSArray *)permissions
77  localAppId:(NSString *)localAppId
78  inSafari:(BOOL)bInSafari;
79 
85 - (BOOL)incrAuthWithPermissions:(NSArray *)permissions;
86 
92 - (BOOL)reauthorizeWithPermissions:(NSArray *)permissions;
93 
99 - (BOOL)handleOpenURL:(NSURL *)url;
100 
106 + (BOOL)HandleOpenURL:(NSURL *)url;
107 
112 - (void)logout:(id<TencentSessionDelegate>)delegate;
113 
118 - (BOOL)isSessionValid;
119 
124 - (BOOL)getUserInfo;
125 
131 - (BOOL)getListAlbum;
132 
139 - (BOOL)getListPhotoWithParams:(NSMutableDictionary *)params;
140 
141 
147 - (BOOL)addShareWithParams:(NSMutableDictionary *)params;
148 
149 
156 - (BOOL)uploadPicWithParams:(NSMutableDictionary *)params;
157 
164 - (BOOL)addAlbumWithParams:(NSMutableDictionary *)params;
165 
171 - (BOOL)checkPageFansWithParams:(NSMutableDictionary *)params;
172 
179 - (BOOL)addOneBlogWithParams:(NSMutableDictionary *)params;
180 
187 - (BOOL)addTopicWithParams:(NSMutableDictionary *)params;
188 
195 - (BOOL)setUserHeadpic:(NSMutableDictionary *)params;
196 
197 
205 - (BOOL)setUserHeadpic:(NSMutableDictionary *)params andViewController:(UIViewController **)viewController;
206 
212 - (BOOL)getVipInfo;
213 
219 - (BOOL)getVipRichInfo;
220 
226 - (BOOL)matchNickTips:(NSMutableDictionary *)params;
227 
233 - (BOOL)getIntimateFriends:(NSMutableDictionary *)params;
234 
241 - (BOOL)sendStory:(NSMutableDictionary *)params friendList:(NSArray *)fopenIdArray;
242 
248 - (BOOL)cancel:(id)userData;
249 @end
250 
256 @protocol TencentLoginDelegate <NSObject>
257 
258 @required
259 
263 - (void)tencentDidLogin;
264 
269 - (void)tencentDidNotLogin:(BOOL)cancelled;
270 
274 - (void)tencentDidNotNetWork;
275 
276 @optional
280 - (NSArray *)getAuthorizedPermissions:(NSArray *)permissions withExtraParams:(NSDictionary *)extraParams;
281 
282 @end
283 
290 
291 @optional
292 
296 - (void)tencentDidLogout;
297 
305 - (BOOL)tencentNeedPerformIncrAuth:(TencentOAuth *)tencentOAuth withPermissions:(NSArray *)permissions;
306 
313 - (BOOL)tencentNeedPerformReAuth:(TencentOAuth *)tencentOAuth;
314 
320 - (void)tencentDidUpdate:(TencentOAuth *)tencentOAuth;
321 
326 - (void)tencentFailedUpdate:(UpdateFailType)reason;
327 
334 - (void)getUserInfoResponse:(APIResponse*) response;
335 
342 - (void)getListAlbumResponse:(APIResponse*) response;
343 
350 - (void)getListPhotoResponse:(APIResponse*) response;
351 
358 - (void)checkPageFansResponse:(APIResponse*) response;
359 
366 - (void)addShareResponse:(APIResponse*) response;
367 
374 - (void)addAlbumResponse:(APIResponse*) response;
375 
382 - (void)uploadPicResponse:(APIResponse*) response;
383 
384 
391 - (void)addOneBlogResponse:(APIResponse*) response;
392 
399 - (void)addTopicResponse:(APIResponse*) response;
400 
407 - (void)setUserHeadpicResponse:(APIResponse*) response;
408 
415 - (void)getVipInfoResponse:(APIResponse*) response;
416 
421 - (void)getVipRichInfoResponse:(APIResponse*) response;
422 
429 - (void)matchNickTipsResponse:(APIResponse*) response;
430 
437 - (void)getIntimateFriendsResponse:(APIResponse*) response;
438 
443 - (void)sendStoryResponse:(APIResponse*) response;
444 
453 - (void)tencentOAuth:(TencentOAuth *)tencentOAuth didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite userData:(id)userData;
454 
455 
461 - (void)tencentOAuth:(TencentOAuth *)tencentOAuth doCloseViewController:(UIViewController *)viewController;
462 
463 @end