NSMutableDictionary+SSDKInit.h
9.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
//
// NSMutableDictionary+ShareSDK.h
// ShareSDK
//
// Created by 冯 鸿杰 on 15/2/6.
// Copyright (c) 2015年 掌淘科技. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SSDKTypeDefine.h"
/**
* 初始化分享平台相关
*/
@interface NSMutableDictionary (SSDKInit)
/**
* 设置平台的授权配置
*
* @param authSettings 授权配置信息
* 例如在配置新浪微博的初始化信息中设置授权配置信息:
* [appInfo SSDKSetAuthSettings:@[@"follow_app_official_microblog"]];
*/
- (void)SSDKSetAuthSettings:(NSArray *)authSettings;
/**
* 设置新浪微博应用信息
*
* @param appKey 应用标识
* @param appSecret 应用密钥
* @param redirectUri 回调地址
* @param authType 授权方式。值可以是:SSDKAuthTypeSSO、SSDKAuthTypeWeb、SSDKAuthTypeBoth,分别代表SSO、网页授权、SSO+网页授权。
*/
- (void)SSDKSetupSinaWeiboByAppKey:(NSString *)appKey
appSecret:(NSString *)appSecret
redirectUri:(NSString *)redirectUri
authType:(NSString *)authType;
/**
* 设置微信(微信好友,微信朋友圈、微信收藏)应用信息
*
* @param appId 应用标识
* @param appSecret 应用密钥
*/
- (void)SSDKSetupWeChatByAppId:(NSString *)appId
appSecret:(NSString *)appSecret;
/**
* 设置Twitter应用信息
*
* @param consumerKey 应用标识
* @param consumerSecret 应用密钥
* @param redirectUri 回调地址
*/
- (void)SSDKSetupTwitterByConsumerKey:(NSString *)consumerKey
consumerSecret:(NSString *)consumerSecret
redirectUri:(NSString *)redirectUri;
/**
* 设置QQ分享平台(QQ空间,QQ好友分享)应用信息
*
* @param appId 应用标识
* @param appKey 应用Key
* @param authType 授权方式。值可以是:SSDKAuthTypeSSO、SSDKAuthTypeWeb、SSDKAuthTypeBoth,分别代表SSO、网页授权、SSO+网页授权。
*/
- (void)SSDKSetupQQByAppId:(NSString *)appId
appKey:(NSString *)appKey
authType:(NSString *)authType;
/**
* 设置Facebook应用信息
*
* @param apiKey 应用标识
* @param appSecret 应用密钥
* @param authType 授权方式。值可以是:SSDKAuthTypeSSO、SSDKAuthTypeWeb、SSDKAuthTypeBoth,分别代表SSO、网页授权、SSO+网页授权。
*/
- (void)SSDKSetupFacebookByApiKey:(NSString *)apiKey
appSecret:(NSString *)appSecret
authType:(NSString *)authType;
/**
* 设置腾讯微博应用信息
*
* @param appKey 应用标识
* @param appSecret 应用密钥
* @param redirectUri 回调地址
* @param authType 授权方式。值可以是:SSDKAuthTypeSSO、SSDKAuthTypeWeb、SSDKAuthTypeBoth,分别代表SSO、网页授权、SSO+网页授权。
*/
- (void)SSDKSetupTencentWeiboByAppKey:(NSString *)appKey
appSecret:(NSString *)appSecret
redirectUri:(NSString *)redirectUri;
/**
* 设置豆瓣应用信息
*
* @param apiKey 应用标识
* @param secret 应用密钥
* @param redirectUri 回调地址
*/
- (void)SSDKSetupDouBanByApiKey:(NSString *)apiKey
secret:(NSString *)secret
redirectUri:(NSString *)redirectUri;
/**
* 设置人人网应用信息
*
* @param appId 应用标识
* @param appKey 应用Key
* @param secretKey 应用密钥
* @param authType 授权方式。值可以是:SSDKAuthTypeSSO、SSDKAuthTypeWeb、SSDKAuthTypeBoth,分别代表SSO、网页授权、SSO+网页授权。
*/
- (void)SSDKSetupRenRenByAppId:(NSString *)appId
appKey:(NSString *)appKey
secretKey:(NSString *)secretKey
authType:(NSString *)authType;
/**
* 设置开心网应用信息
*
* @param apiKey 应用标识
* @param secretKey 应用密钥
* @param redirectUri 回调地址
*/
- (void)SSDKSetupKaiXinByApiKey:(NSString *)apiKey
secretKey:(NSString *)secretKey
redirectUri:(NSString *)redirectUri;
/**
* 设置Pocket应用信息
*
* @param consumerKey 应用标识
* @param redirectUri 回调地址
* @param authType 授权方式。值可以是:SSDKAuthTypeSSO、SSDKAuthTypeWeb、SSDKAuthTypeBoth,分别代表SSO、网页授权、SSO+网页授权。
*/
- (void)SSDKSetupPocketByConsumerKey:(NSString *)consumerKey
redirectUri:(NSString *)redirectUri
authType:(NSString *)authType;
/**
* 设置Google+应用信息
*
* @param clientId 应用标识
* @param clientSecret 应用密钥
* @param redirectUri 回调地址
*/
- (void)SSDKSetupGooglePlusByClientID:(NSString *)clientId
clientSecret:(NSString *)clientSecret
redirectUri:(NSString *)redirectUri;
/**
* 设置Instagram应用信息
*
* @param clientId 应用标识
* @param clientSecret 应用密钥
* @param redirectUri 回调地址
*/
- (void)SSDKSetupInstagramByClientID:(NSString *)clientId
clientSecret:(NSString *)clientSecret
redirectUri:(NSString *)redirectUri;
/**
* 设置LinkedIn应用信息
*
* @param apiKey 应用标识
* @param secretKey 应用密钥
* @param redirectUrl 回调地址
*/
- (void)SSDKSetupLinkedInByApiKey:(NSString *)apiKey
secretKey:(NSString *)secretKey
redirectUrl:(NSString *)redirectUrl;
/**
* 设置Tumblr应用信息
*
* @param consumerKey 应用标识
* @param consumerSecret 应用密钥
* @param callbackUrl 回调地址
*/
- (void)SSDKSetupTumblrByConsumerKey:(NSString *)consumerKey
consumerSecret:(NSString *)consumerSecret
callbackUrl:(NSString *)callbackUrl;
/**
* 设置Flickr应用信息
*
* @param apiKey 应用标识
* @param apiSecret 应用密钥
*/
- (void)SSDKSetupFlickrByApiKey:(NSString *)apiKey
apiSecret:(NSString *)apiSecret;
/**
* 设置有道云笔记应用信息
*
* @param consumerKey 应用标识
* @param consumerSecret 应用密钥
* @param oauthCallback 回调地址
*/
- (void)SSDKSetupYouDaoNoteByConsumerKey:(NSString *)consumerKey
consumerSecret:(NSString *)consumerSecret
oauthCallback:(NSString *)oauthCallback;
/**
* 设置印象笔记应用信息,注:中国版和国际版都是调用此接口进行初始化操作。
*
* @param consumerKey 应用标识
* @param consumerSecret 应用密钥
* @param sandbox 是否为沙箱模式, YES 沙箱模式,NO 非沙箱模式
*/
- (void)SSDKSetupEvernoteByConsumerKey:(NSString *)consumerKey
consumerSecret:(NSString *)consumerSecret
sandbox:(BOOL)sandbox;
/**
* 设置支付宝好友应用信息
*
* @param appId 应用标识
*/
- (void)SSDKSetupAliPaySocialByAppId:(NSString *)appId;
/**
* 设置Pinterest应用信息
*
* @param clientId 应用标识
*/
- (void)SSDKSetupPinterestByClientId:(NSString *)clientId;
/**
* 设置KaKao应用信息
*
* @param appKey 应用标识, 当使用客户端授权分享和授权时需要传入该标识
* @param restApiKey RestApi标识
* @param reidrectUri 回调地址
* @param authType 授权方式。值可以是:SSDKAuthTypeSSO、SSDKAuthTypeWeb、SSDKAuthTypeBoth,分别代表SSO、网页授权、SSO+网页授权。
*/
- (void)SSDKSetupKaKaoByAppKey:(NSString *)appKey
restApiKey:(NSString *)restApiKey
redirectUri:(NSString *)redirectUri
authType:(NSString *)authType;
/**
* 设置Dropbox应用信息
*
* @param appKey 应用标识
* @param appSecret 应用密钥
* @param oauthCallback 回调地址
*/
- (void)SSDKSetupDropboxByAppKey:(NSString *)appKey
appSecret:(NSString *)appSecret
oauthCallback:(NSString *)oauthCallback;
/**
* 设置VKontakte应用信息
*
* @param applicationId 应用标识
* @param secretKey 应用密钥
* @param authType 授权方式。值可以是:SSDKAuthTypeSSO、SSDKAuthTypeWeb、SSDKAuthTypeBoth,分别代表SSO、网页授权、SSO+网页授权。
*/
- (void)SSDKSetupVKontakteByApplicationId:(NSString *)applicationId
secretKey:(NSString *)secretKey;
- (void)SSDKSetupVKontakteByApplicationId:(NSString *)applicationId
secretKey:(NSString *)secretKey
authType:(NSString *)authType;
/**
* 设置明道应用信息
*
* @param appKey 应用标识
* @param appSecret 应用密钥
* @param redirectUri 回调地址
*/
- (void)SSDKSetupMingDaoByAppKey:(NSString *)appKey
appSecret:(NSString *)appSecret
redirectUri:(NSString *)redirectUri;
/**
* 设置易信(易信好友,易信朋友圈、易信收藏)应用信息
*
* @param appId 应用标识
* @param appSecret 应用密钥
* @param redirectUri 回调地址
* @param authType 授权方式。值可以是:SSDKAuthTypeSSO、SSDKAuthTypeWeb、SSDKAuthTypeBoth,分别代表SSO、网页授权、SSO+网页授权。
*/
- (void)SSDKSetupYiXinByAppId:(NSString *)appId
appSecret:(NSString *)appSecret
redirectUri:(NSString *)redirectUri
authType:(NSString *)authType;
/**
* 设置Instapaper
*
* @param consumerKey 应用标识
* @param comsumerSecret 应用密钥
*/
- (void)SSDKSetupInstapaperByConsumerKey:(NSString *)consumerKey
consumerSecret:(NSString *)consumerSecret;
@end