iOS 平台,使用Facebook图文分享,分享弹窗只显示图片,但无法显示文本
-(void)shareImageAndTextToPlatformType:(UMSocialPlatformType)platformType
{
//创建分享消息对象
UMSocialMessageObject*messageObject =[UMSocialMessageObject messageObject];
//设置文本
messageObject.text =@"社会化组件UShare将各大社交平台接入您的应用,快速武装App。";
//创建图片内容对象
UMShareImageObject*shareObject =[[UMShareImageObject alloc] init];
//如果有缩略图,则设置缩略图
shareObject.thumbImage =[UIImage imageNamed:@"icon"];
[shareObject setShareImage:@"https://www.umeng.com/img/index/demo/1104.4b2f7dfe614bea70eea4c6071c72d7f5.jpg"];
//分享消息对象设置分享内容对象
messageObject.shareObject = shareObject;
//调用分享接口
[[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject currentViewController:self completion:^(id data,NSError*error){
if(error){
NSLog(@"************Share fail with error %@*********",error);
}else{
NSLog(@"response data is %@",data);
}
}];
}
报错原因:************Share fail with error Error Domain=UMSocialPlatformErrorDomain Code=2006 "(null)" UserInfo={\^^message=Share data type is illegal}*********