友盟分享时 QQ、微信等网页分享正常 微博分享会出现不显示详情和图片的情况 解决方法是 微博分享特殊处理 把详情和标题拼接起来一起显示 分享样式更改为UMShareImageObject图片分享即可:
- (void)shareWithOption:(UMSocialPlatformType)platformType {
// 创建消息分享对象
UMSocialMessageObject *messageObjc = [UMSocialMessageObject messageObject];
//创建网页内容对象
NSString* thumbURL = _homeModel.u_pic;
//微博特殊处理
if (platformType == UMSocialPlatformType_Sina) {
UMShareImageObject *shareObject = [[UMShareImageObject alloc] init];
shareObject.thumbImage = [UIImage imageNamed:@"icon"];
[shareObject setShareImage:thumbURL];
messageObjc.text = [NSString stringWithFormat:@"%@%@%@",_homeModel.nick_name,_homeModel.title,_homeModel.h5];
//分享消息对象设置分享内容对象
messageObjc.shareObject = shareObject;
}else{
//标题 描述 头像
UMShareWebpageObject *shareObject = [UMShareWebpageObject shareObjectWithTitle:_homeModel.nick_name descr:_homeModel.title thumImage:thumbURL];
//设置网页地址
shareObject.webpageUrl = _homeModel.h5;
//分享消息对象设置分享内容对象
messageObjc.shareObject = shareObject;
}