分享到 :

分享图片到空间

  • 使用场景

用于分享图片到空间,走写说说路径,当图片数组为空时,默认走文本写说说

  • 接口方法

新增对象类QQApiImageArrayForQZoneObject

- (id)initWithImageArrayData:(NSArray*)imageDataArray title:(NSString*)title extMap:(NSDictionary *)extMap;
+ (id)objectWithimageDataArray:(NSArray*)imageDataArray title:(NSString*)title extMap:(NSDictionary *)extM
  • 参数说明
参数含义
imageDataArray图片数组
extMap扩展字段
  • 示例代码
NSData* imageData = [NSData dataWithContentsOfFile:@"xxx.png"]
NSArray* imageAssetsForQZone = @[imageData];
QQApiImageArrayForQZoneObject *img = [QQApiImageArrayForQZoneObject objectWithimageDataArray:imageAssetsForQZone title:@"测试" extMap:nil];
img.shareDestType = ShareDestTypeQQ;
SendMessageToQQReq* req = [SendMessageToQQReq reqWithContent:img];
QQApiSendResultCode sent = [QQApiInterface SendReqToQZone:req];
[self handleSendResult:sent];
返回顶部