NSMutableDictionary+SSDKInit.h 10.0 KB

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