File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -417,14 +417,10 @@ -(void)didSelectSocialPlatform:(NSString *)platformName withSocialData:(UMSocial
417
417
// 设置分享内容,和回调对象
418
418
{
419
419
socialData.shareText = [self p_shareText ];
420
+ socialData.shareImage = [UIImage imageNamed: @" logo_about" ];
420
421
NSString *imageUrl = [self p_imageUrl ];
421
- if (imageUrl.length > 0 ) {
422
- socialData.urlResource = [[UMSocialUrlResource alloc ] initWithSnsResourceType: UMSocialUrlResourceTypeImage url: imageUrl];
423
- socialData.shareImage = nil ;
424
- }else {
425
- socialData.urlResource = nil ;
426
- socialData.shareImage = [UIImage imageNamed: @" logo_about" ];
427
- }
422
+ socialData.urlResource .url = imageUrl;
423
+ socialData.urlResource .resourceType = imageUrl.length > 0 ? UMSocialUrlResourceTypeImage: UMSocialUrlResourceTypeDefault;
428
424
}
429
425
if ([platformName isEqualToString: @" wxsession" ]) {
430
426
UMSocialWechatSessionData *wechatSessionData = [UMSocialWechatSessionData new ];
You can’t perform that action at this time.
0 commit comments