美文网首页
友盟单个分享代码

友盟单个分享代码

作者: lixiangdev | 来源:发表于2017-02-14 22:33 被阅读0次

正确样式

[[UMSocialControllerService defaultControllerService] setShareText:@"分享内嵌文字" shareImage:[UIImage imageNamed:@"icon"] socialUIDelegate:self];        //设置分享内容和回调对象
[UMSocialSnsPlatformManager getSocialPlatformWithName:UMShareToSina].snsClickHandler(self,[UMSocialControllerService defaultControllerService],YES);

错误样式

UIViewController *viewcon = GNAppDelegate.rootNavigationController;
[[UMSocialDataService defaultDataService]  postSNSWithTypes:@[keySharedStr] content:titleStr image:shareImage location:nil urlResource:nil presentedController:viewcon completion:^(UMSocialResponseEntity *response){
    if (response.responseCode == UMSResponseCodeSuccess) {
        NSLog(@"分享成功!");
    }
 }];

相关文章

网友评论

      本文标题:友盟单个分享代码

      本文链接:https://www.haomeiwen.com/subject/czyfwttx.html