app分享到微信,微信中 打开链接 通过回调地址中的参数 isappinstalled 来 判断用户手机有没安装app,如果安装了,从微信中web页面 跳到 app 是怎么做的???
微信 怎么 跳转到我们的appapp分享到微信,微信中 打开链接 通过回调地址中的参数 isappinstalled 来 判断用户手机有没安装app,如果安装了,从微信中web页面 跳到 app 是怎么做的??? 6 个回答web端: 客户端: - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation 截获url后,拆分参数跳到相应viewcontroller app注册了协议吗? 需要把你的 app 在 info.plist 里注册一个 URL Scheme. 搞定了,URL Scheme 没问题,是格式写错了 WXMediaMessage *message = [WXMediaMessage message]; NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:self.imageUrl]]; UIImage *image = [UIImage imageWithData:data]; NSData *imageData = UIImageJPEGRepresentation(image, 0.1); message.thumbData = imageData; message.title = self.CommentsName; message.description = self.myView.text; WXAppExtendObject *ext = [WXAppExtendObject object]; ext.extInfo = @"<xml>test</xml>"; Byte* pBuffer = (Byte *)malloc(BUFFER_SIZE); memset(pBuffer, 0, BUFFER_SIZE); NSData* data1 = [NSData dataWithBytes:pBuffer length:BUFFER_SIZE]; free(pBuffer); ext.fileData = data1; message.mediaObject = ext; GetMessageFromWXResp* resp = [[[GetMessageFromWXResp alloc] init] autorelease]; resp.message = message; resp.bText = NO; [WXApi sendResp:resp]; 分享到朋友圈没法返回到自己的程序 |
|