File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -417,14 +417,10 @@ -(void)didSelectSocialPlatform:(NSString *)platformName withSocialData:(UMSocial
417417 // 设置分享内容,和回调对象
418418 {
419419 socialData.shareText = [self p_shareText ];
420+ socialData.shareImage = [UIImage imageNamed: @" logo_about" ];
420421 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;
428424 }
429425 if ([platformName isEqualToString: @" wxsession" ]) {
430426 UMSocialWechatSessionData *wechatSessionData = [UMSocialWechatSessionData new ];
You can’t perform that action at this time.
0 commit comments