收藏
回答

IOS端APP分享到企业微信后,点击返回APP没有反应,还是留在企业微信?

RCT_EXPORT_METHOD(shareLinkAttachment:(NSString *)title :(NSString *)summary :(NSString *)url) {
    WWKSendMessageReq *req = [[WWKSendMessageReq alloc] init];
    WWKMessageLinkAttachment *attachment = [[WWKMessageLinkAttachment alloc] init];
    // 示例用链接,请填写你想分享的实际链接的标题、介绍、图标和URL
    attachment.title = title;
    if (summary) {
        attachment.summary = summary;
    }
    attachment.url = url;
    attachment.icon = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"icon" ofType:@"jpg"]];
    req.attachment = attachment;
    [WWKApi sendReq:req];
}



#pragma mark - wx callback


-(void) onReq:(WWKBaseReq *)req {
    NSLog(@"onReq");
}


- (void)onResp:(WWKBaseResp *)resp {
    /* SSO 的回调 */
    if ([resp isKindOfClass:[WWKSSOResp class]]) {
        WWKSSOResp *r = (WWKSSOResp *)resp;


        NSMutableDictionary *body = [NSMutableDictionary new];
        body[@"errCode"] = @(r.errCode);
        body[@"errStr"] = r.errStr;
        body[@"state"] = r.state;
        body[@"code"] = r.code;
        body[@"type"] = @"SSOAuth.Resp";


        NSLog(@"body = %@", [body description]);


        [self sendEventWithName:WeChatWorkEventName body:body];
    } else
    /// 分享回调
    if ([resp isKindOfClass:[WWKSendMessageResp class]]) {
        WWKSendMessageResp *r = (WWKSendMessageResp *)resp;
        
        NSMutableDictionary *body = [NSMutableDictionary new];
        body[@"errCode"] = @(r.errCode);
        body[@"errStr"] = r.errStr;
        body[@"type"] = @"Share.Resp";
        
        NSLog(@"body = %@", [body description]);
        
        [self sendEventWithName:WeChatWorkEventName body:body];
    }
}


最后一次编辑于  2021-02-03
回答关注问题邀请回答
收藏

2 个回答

  • 企业微信运营专员-千夜
    企业微信运营专员-千夜
    2021-02-01

    你好,可以提供下企业corpid 应用agentid schema 用户手机号或者userid 分享的时间点 这些看下

    2021-02-01
    有用
    回复 10
    查看更多(5)
  • 小馋猫
    小馋猫
    2021-05-15

    请问下有下文了吗? 我也是没有回调

    2021-05-15
    有用
    回复 4
    • 飞鸟
      飞鸟
      2021-05-15
      我解决了我的问题,是IOS的配置没填对
      2021-05-15
      回复
    • 无锋
      无锋
      2021-07-31回复飞鸟
      老哥具体什么配置没填呢
      2021-07-31
      回复
    • Ambition
      Ambition
      2022-05-14
      同问啊,需要配置那些东西
      2022-05-14
      回复
    • Ambition
      Ambition
      2022-05-14回复Ambition
      需要在URL Types 中把企业微信的Schema,配置上,请看官方给的demo中。我配置好之后就解决了
      2022-05-14
      回复
登录 后发表内容
问题标签