QQApiInterface#isQQInstalled
和QQApiInterface#isQQSupportApi
检测发现QQ没安装或当前版本QQ不支持API调用,可引导用户通过打开此链接下载最新版QQ。
147 | \return iPhoneQQ下载地址
148 | */
149 | + (NSString *)getQQInstallUrl;
150 |
151 | /**
152 | 获取TIM下载地址
153 |
154 | 如果App通过QQApiInterface#isTIMInstalled
检测发现TIM没安装或当前版本TIM不支持API调用,可引导用户通过打开此链接下载最新版TIM。
155 | \return iPhoneTIM下载地址
156 | */
157 | + (NSString *)getTIMInstallUrl;
158 | @end
159 |
--------------------------------------------------------------------------------
/YHThirdManager/ThirdParty/QQ/TencentOpenAPI.framework/Headers/QQApiInterfaceObject.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// \file QQApiInterfaceObject.h
3 | /// \brief QQApiInterface所依赖的请求及应答消息对象封装帮助类
4 | ///
5 | /// Created by Tencent on 12-5-15.
6 | /// Copyright (c) 2012年 Tencent. All rights reserved.
7 | ///
8 |
9 | #ifndef QQApiInterface_QQAPIOBJECT_h
10 | #define QQApiInterface_QQAPIOBJECT_h
11 |
12 | #import error | errorDescription | 注释 |
0 | nil | 成功 |
-1 | param error | 参数错误 |
-2 | group code is invalid | 该群不在自己的群列表里面 |
-3 | upload photo failed | 上传图片失败 |
-4 | user give up the current operation | 用户放弃当前操作 |
-5 | client internal error | 客户端内部处理错误 |
QQApiExtendObject
实例
210 | */
211 | + (id)objectWithData:(NSData*)data previewImageData:(NSData*)previewImageData title:(NSString*)title description:(NSString*)description;
212 |
213 | /**
214 | helper方法获取一个autorelease的QQApiExtendObject
对象
215 | @param data 数据内容
216 | @param previewImageData 用于预览的图片
217 | @param title 标题
218 | @param description 此对象,分享的描述
219 | @param imageDataArray 发送的多张图片队列
220 | @return
221 | 一个自动释放的QQApiExtendObject
实例
222 | */
223 | + (id)objectWithData:(NSData*)data previewImageData:(NSData*)previewImageData title:(NSString*)title description:(NSString*)description imageDataArray:(NSArray*)imageDataArray;
224 |
225 | @end
226 |
227 | // QQApiImageObject
228 | /** @brief 图片对象
229 | 用于分享图片内容的对象,是一个指定为图片类型的QQApiExtendObject
230 | */
231 | @interface QQApiImageObject : QQApiExtendObject
232 | @end
233 |
234 | // QQApiImageForQQAvatarObject
235 | /** @brief 图片对象
236 | 用于设置QQ头像内容的对象,是一个指定为图片类型的QQApiExtendObject
237 | */
238 | @interface QQApiImageForQQAvatarObject : QQApiExtendObject
239 | @end
240 | /**
241 | * @brief 视频对象
242 | * 用于设置动态头像
243 | * assetURL可传ALAsset的ALAssetPropertyAssetURL,或者PHAsset的localIdentifier
244 | 从手Q返回的错误码:
245 | //第三方设置动态头像结果
246 | @"ret=0"//设置成功
247 | @"ret=-10&error_des=user cancel"//用户取消设置
248 | @"ret=-11&error_des=pasteboard have no video data"//剪切板没有数据
249 | @"ret=-12&error_des=export data failed"//从剪切板导出数据到本地失败
250 | @"ret=-13&error_des=url param invalid"//sdk传递过来的数据有误
251 | @"ret=-14&error_des=video param invalid"//视频的参数不符合要求(检测第三方视频源方案:1、分辨率跟480*480保持一致;2、视频长度0.5s~8s)
252 | @"ret=-15&error_des=app authorised failed"//应用鉴权失败
253 | @"ret=-16&error_des=upload video failed"//设置头像,上传到后台失败
254 | @"ret=-17&error_des=account diff"//账号不一致
255 | */
256 | @interface QQApiVideoForQQAvatarObject : QQApiExtendObject
257 | @property(nonatomic, retain) NSString *assetURL;
258 | @end
259 |
260 | // QQApiImageArrayForFaceCollectionObject
261 | /** @brief 图片数组对象
262 | 用于分享图片组到表情收藏,是一个指定为图片类型的QQApiObject
263 | */
264 | @interface QQApiImageArrayForFaceCollectionObject : QQApiObject
265 |
266 | @property(nonatomic,retain) NSArray* imageDataArray;///图片数组
267 |
268 | /**
269 | 初始化方法
270 | @param imageDataArray 图片数组
271 | */
272 | - (id)initWithImageArrayData:(NSArray*)imageDataArray;
273 | /**
274 | helper方法获取一个autorelease的QQApiObject
对象
275 | @param imageDataArray 发送的多张图片队列
276 | @return
277 | 一个自动释放的QQApiObject
实例
278 | */
279 | + (id)objectWithimageDataArray:(NSArray *)imageDataArray;
280 |
281 | @end
282 |
283 | // QQApiImageArrayForQZoneObject
284 | /** @brief 图片对象
285 | 用于分享图片到空间,走写说说路径,是一个指定为图片类型的,当图片数组为空时,默认走文本写说说QQApiObject
286 | */
287 | @interface QQApiImageArrayForQZoneObject : QQApiObject
288 |
289 | @property(nonatomic,retain) NSArray* imageDataArray;///图片数组
290 | @property(nonatomic,retain) NSDictionary* extMap; // 扩展字段
291 |
292 | /**
293 | 初始化方法
294 | @param imageDataArray 图片数组
295 | @param title 写说说的内容,可以为空
296 | @param extMap 扩展字段
297 | */
298 | - (id)initWithImageArrayData:(NSArray*)imageDataArray title:(NSString*)title extMap:(NSDictionary *)extMap;
299 |
300 | /**
301 | helper方法获取一个autorelease的QQApiExtendObject
对象
302 | @param title 写说说的内容,可以为空
303 | @param imageDataArray 发送的多张图片队列
304 | @param extMap 扩展字段
305 | @return
306 | 一个自动释放的QQApiExtendObject
实例
307 | */
308 | + (id)objectWithimageDataArray:(NSArray*)imageDataArray title:(NSString*)title extMap:(NSDictionary *)extMap;
309 |
310 | @end
311 |
312 | // QQApiVideoForQZoneObject
313 | /** @brief 视频对象
314 | 用于分享视频到空间,走写说说路径QQApiObject
,assetURL和videoData两个参数必须设置至少一个参数,如果assetURL设置了忽略videoData参数
315 | @param assetURL可传ALAsset的ALAssetPropertyAssetURL,或者PHAsset的localIdentifier
316 | @param extMap 扩展字段
317 | @param videoData 视频数据,大小不超过50M
318 | */
319 | @interface QQApiVideoForQZoneObject : QQApiObject
320 |
321 | @property(nonatomic, retain) NSString *assetURL;
322 | @property(nonatomic,retain) NSDictionary* extMap; // 扩展字段
323 | @property(nonatomic,retain) NSData* videoData;
324 |
325 | - (id)initWithAssetURL:(NSString*)assetURL title:(NSString*)title extMap:(NSDictionary *)extMap;
326 |
327 | + (id)objectWithAssetURL:(NSString*)assetURL title:(NSString*)title extMap:(NSDictionary *)extMap;
328 |
329 | - (id)initWithVideoData:(NSData*)videoData title:(NSString*)title extMap:(NSDictionary *)extMap;
330 |
331 | + (id)objectWithVideoData:(NSData*)videoData title:(NSString*)title extMap:(NSDictionary *)extMap;
332 |
333 | @end
334 |
335 | // QQApiWebImageObject
336 | /** @brief 图片对象
337 | 用于分享网络图片内容的对象,是一个指定网络图片url的: 该类型只在2.9.0的h5分享中才支持,
338 | 原有的手q分享是不支持该类型的。
339 | */
340 | @interface QQApiWebImageObject : QQApiObject
341 |
342 | @property(nonatomic, retain) NSURL *previewImageURL; ///<预览图像URL
343 |
344 | /**
345 | 初始化方法
346 | @param previewImageURL 用于预览的图片
347 | @param title 标题
348 | @param description 此对象,分享的描述
349 | */
350 | - (id)initWithPreviewImageURL:(NSURL*)previewImageURL title:(NSString*)title description:(NSString*)description;
351 |
352 | /**
353 | helper方法获取一个autorelease的QQApiWebImageObject
对象
354 | @param previewImageURL 用于预览的图片
355 | @param title 标题
356 | @param description 此对象,分享的描述
357 | */
358 | + (id)objectWithPreviewImageURL:(NSURL*)previewImageURL title:(NSString*)title description:(NSString*)description;
359 |
360 | @end
361 |
362 |
363 | //QQApiFileObject
364 | /** @brief 本地文件对象(暂只支持分享到手机QQ数据线功能)
365 | 用于分享文件内容的对象,是一个指定为文件类型的QQApiExtendObject
366 | */
367 | @interface QQApiFileObject : QQApiExtendObject
368 | {
369 | NSString* _fileName;
370 | }
371 | @property(nonatomic, retain)NSString* fileName;
372 | @end
373 |
374 | // QQApiAudioObject
375 | /** @brief 音频URL对象
376 | 用于分享目标内容为音频的URL的对象
377 | */
378 | @interface QQApiAudioObject : QQApiURLObject
379 |
380 | @property (nonatomic, retain) NSURL *flashURL; ///<音频URL地址,最长512个字符
381 |
382 | /**
383 | 获取一个autorelease的QQApiAudioObject
384 | @param url 音频内容的目标URL
385 | @param title 分享内容的标题
386 | @param description 分享内容的描述
387 | @param data 分享内容的预览图像
388 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
389 | */
390 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageData:(NSData*)data;
391 |
392 | /**
393 | 获取一个autorelease的QQApiAudioObject
394 | @param url 音频内容的目标URL
395 | @param title 分享内容的标题
396 | @param description 分享内容的描述
397 | @param previewURL 分享内容的预览图像URL
398 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
399 | */
400 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageURL:(NSURL*)previewURL;
401 |
402 | @end
403 |
404 | // QQApiVideoObject
405 | /** @brief 视频URL对象
406 | 用于分享目标内容为视频的URL的对象
407 |
408 | QQApiVideoObject类型的分享,目前在Android和PC QQ上接收消息时,展现有待完善,待手机QQ版本以后更新支持
409 | 目前如果要分享视频,推荐使用 QQApiNewsObject 类型
410 | */
411 | @interface QQApiVideoObject : QQApiURLObject
412 |
413 | @property (nonatomic, retain) NSURL *flashURL; ///<视频URL地址,最长512个字符
414 |
415 | /**
416 | 获取一个autorelease的QQApiVideoObject
417 | @param url 视频内容的目标URL
418 | @param title 分享内容的标题
419 | @param description 分享内容的描述
420 | @param data 分享内容的预览图像
421 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
422 | */
423 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageData:(NSData*)data;
424 |
425 | /**
426 | 获取一个autorelease的QQApiVideoObject
427 | @param url 视频内容的目标URL
428 | @param title 分享内容的标题
429 | @param description 分享内容的描述
430 | @param previewURL 分享内容的预览图像URL
431 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
432 | */
433 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageURL:(NSURL*)previewURL;
434 |
435 | @end
436 |
437 | // QQApiNewsObject
438 | /** @brief 新闻URL对象
439 | 用于分享目标内容为新闻的URL的对象
440 | */
441 | @interface QQApiNewsObject : QQApiURLObject
442 | /**
443 | 获取一个autorelease的QQApiNewsObject
444 | @param url 视频内容的目标URL
445 | @param title 分享内容的标题
446 | @param description 分享内容的描述
447 | @param data 分享内容的预览图像
448 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
449 | */
450 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageData:(NSData*)data;
451 |
452 | /**
453 | 获取一个autorelease的QQApiNewsObject
454 | @param url 视频内容的目标URL
455 | @param title 分享内容的标题
456 | @param description 分享内容的描述
457 | @param previewURL 分享内容的预览图像URL
458 | @note 如果url为空,调用QQApi#sendMessage:
时将返回FALSE
459 | */
460 | +(id)objectWithURL:(NSURL*)url title:(NSString*)title description:(NSString*)description previewImageURL:(NSURL*)previewURL;
461 |
462 | @end
463 |
464 | // QQApiCommonContentObject;
465 | /** @brief 通用模板类型对象
466 | 用于分享一个固定显示模板的图文混排对象
467 | @note 图片列表和文本列表不能同时为空
468 | */
469 | @interface QQApiCommonContentObject : QQApiObject
470 | /**
471 | 预定义的界面布局类型
472 | */
473 | @property(nonatomic,assign) unsigned int layoutType;
474 | @property(nonatomic,assign) NSData* previewImageData;///<预览图
475 | @property(nonatomic,retain) NSArray* textArray;///<文本列表
476 | @property(nonatomic,retain) NSArray* pictureDataArray;///<图片列表
477 | +(id)objectWithLayoutType:(int)layoutType textArray:(NSArray*)textArray pictureArray:(NSArray*)pictureArray previewImageData:(NSData*)data;
478 | /**
479 | 将一个NSDictionary对象转化为QQApiCommomContentObject,如果无法转换,则返回空
480 | */
481 | +(id)objectWithDictionary:(NSDictionary*)dic;
482 | -(NSDictionary*)toDictionary;
483 | @end
484 |
485 | // QQApiExtraServiceObject;
486 | /**
487 | @brief OpenSDK扩展支持的服务,通用接口,后续会扩充能力
488 | @param serviceID [必选] 扩展支持的服务类型ID,参考官方文档说明
489 | @param openID [必选] 授权登录后对该用户的唯一标识
490 | @param toUin [可选] 对方的QQ号码
491 | @param extraInfo [可选] 扩展字段
492 | @note 该接口的使用须先登录
493 | */
494 | @interface QQApiExtraServiceObject : QQApiObject
495 | @property (nonatomic,retain) NSString* serviceID;
496 | @property (nonatomic,retain) NSString* openID;
497 | @property (nonatomic,retain) NSString* toUin;
498 | @property (nonatomic,retain) NSDictionary* extraInfo;
499 |
500 | - (id)initWithOpenID:(NSString *)openID serviceID:(NSString *)serviceID;
501 | + (id)objecWithOpenID:(NSString *)openID serviceID:(NSString *)serviceID;
502 | @end
503 |
504 |
505 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////
506 | // Ad item object definition
507 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////
508 | /** @brief 广告数据对象
509 | */
510 | @interface QQApiAdItem : NSObject
511 | @property(nonatomic,retain) NSString* title; ///<名称
512 | @property(nonatomic,retain) NSString* description;///<描述
513 | @property(nonatomic,retain) NSData* imageData;///<广告图片
514 | @property(nonatomic,retain) NSURL* target;///<广告目标链接
515 | @end
516 |
517 |
518 | #pragma mark - QQApi请求消息类型
519 |
520 | /**
521 | QQApi请求消息类型
522 | */
523 | typedef NS_ENUM(NSUInteger, QQApiInterfaceReqType) {
524 | EGETMESSAGEFROMQQREQTYPE = 0, ///< 手Q -> 第三方应用,请求第三方应用向手Q发送消息
525 | ESENDMESSAGETOQQREQTYPE = 1, ///< 第三方应用 -> 手Q,第三方应用向手Q分享消息
526 | ESHOWMESSAGEFROMQQREQTYPE = 2, ///< 手Q -> 第三方应用,请求第三方应用展现消息中的数据
527 | ESENDMESSAGEARKTOQQREQTYPE = 3, ///< 第三方应用 -> 手Q,第三方应用向手Q分享Ark消息
528 | ESENDMESSAGE_MINI_TOQQREQTYPE = 4 ///< 第三方应用 -> 手Q,第三方应用向手Q分享小程序消息
529 | };
530 |
531 | /**
532 | QQApi应答消息类型
533 | */
534 | typedef NS_ENUM(NSUInteger, QQApiInterfaceRespType) {
535 | ESHOWMESSAGEFROMQQRESPTYPE = 0, ///< 第三方应用 -> 手Q,第三方应用应答消息展现结果
536 | EGETMESSAGEFROMQQRESPTYPE = 1, ///< 第三方应用 -> 手Q,第三方应用回应发往手Q的消息
537 | ESENDMESSAGETOQQRESPTYPE = 2 ///< 手Q -> 第三方应用,手Q应答处理分享消息的结果
538 | };
539 |
540 | /**
541 | QQApi请求消息基类
542 | */
543 | @interface QQBaseReq : NSObject
544 |
545 | /** 请求消息类型,参见\ref QQApiInterfaceReqType */
546 | @property (nonatomic, assign) int type;
547 |
548 | @end
549 |
550 | /**
551 | QQApi应答消息基类
552 | */
553 | @interface QQBaseResp : NSObject
554 |
555 | /** 请求处理结果 */
556 | @property (nonatomic, copy) NSString* result;
557 |
558 | /** 具体错误描述信息 */
559 | @property (nonatomic, copy) NSString* errorDescription;
560 |
561 | /** 应答消息类型,参见\ref QQApiInterfaceRespType */
562 | @property (nonatomic, assign) int type;
563 |
564 | /** 扩展信息 */
565 | @property (nonatomic, assign) NSString* extendInfo;
566 |
567 | @end
568 |
569 | /**
570 | GetMessageFromQQReq请求帮助类
571 | */
572 | @interface GetMessageFromQQReq : QQBaseReq
573 |
574 | /**
575 | 创建一个GetMessageFromQQReq请求实例
576 | */
577 | + (GetMessageFromQQReq *)req;
578 |
579 | @end
580 |
581 | @interface SendMessageToQQReq : QQBaseReq
582 |
583 | /**
584 | 创建一个SendMessageToQQReq请求实例
585 | \param message 具体分享消息实例
586 | \return 新创建的SendMessageToQQReq请求实例
587 | */
588 | + (SendMessageToQQReq *)reqWithContent:(QQApiObject *)message;
589 |
590 | /**
591 | 创建一个支持Ark的SendMessageToQQReq请求实例
592 | \param message 具体分享消息实例
593 | \return 新创建的SendMessageToQQReq请求实例
594 | */
595 | + (SendMessageToQQReq *)reqWithArkContent:(ArkObject *)message;
596 | /**
597 | * 创建一个支持小程序的消息请求实例
598 | * @param miniMessage 小程序实例对象
599 | * @return 消息请求实例
600 | */
601 | +(SendMessageToQQReq*) reqWithMiniContent:(QQApiMiniProgramObject *)miniMessage;
602 | /** 具体分享消息 */
603 | @property (nonatomic, retain) QQApiObject *message;
604 |
605 | /** 支持Ark的具体分享消息 */
606 | @property (nonatomic, retain) ArkObject *arkMessage;
607 | /** 支持小程序的具体分享消息 */
608 | @property (nonatomic, retain) QQApiMiniProgramObject *miniMessage;
609 | @end
610 |
611 | /**
612 | SendMessageToQQResp应答帮助类
613 | */
614 | @interface SendMessageToQQResp : QQBaseResp
615 |
616 | /**
617 | 创建一个SendMessageToQQResp应答实例
618 | \param result 请求处理结果
619 | \param errDesp 具体错误描述信息
620 | \param extendInfo 扩展信息
621 | \return 新创建的SendMessageToQQResp应答实例
622 | */
623 | + (SendMessageToQQResp *)respWithResult:(NSString *)result errorDescription:(NSString *)errDesp extendInfo:(NSString*)extendInfo;
624 |
625 | @end
626 |
627 | /**
628 | ShowMessageFromQQReq请求帮助类
629 | */
630 | @interface ShowMessageFromQQReq : QQBaseReq
631 |
632 | /**
633 | 创建一个ShowMessageFromQQReq请求实例
634 | \param message 具体待展现消息实例
635 | \return 新创建的ShowMessageFromQQReq请求实例
636 | */
637 | + (ShowMessageFromQQReq *)reqWithContent:(QQApiObject *)message;
638 |
639 | /** 具体待展现消息 */
640 | @property (nonatomic, retain) QQApiObject *message;
641 |
642 | @end
643 |
644 |
645 | #endif
646 |
--------------------------------------------------------------------------------
/YHThirdManager/ThirdParty/QQ/TencentOpenAPI.framework/Headers/TencentOAuth.h:
--------------------------------------------------------------------------------
1 | ///
2 | /// \file TencentOAuth.h
3 | /// \brief QQ互联开放平台授权登录及相关开放接口实现类
4 | ///
5 | /// Created by Tencent on 12-12-21.
6 | /// Copyright (c) 2012年 Tencent. All rights reserved.
7 | ///
8 |
9 | #import