NSString *guid = @"796d826087d1d33b4cf04154bfadb2d6";
NSString *webpageUrl = @"https://www.wechat.com";
webpageUrl = @"https://www.wechat.com";
NSString *path = [NSString stringWithFormat:@"page/index/index?guid=%@",guid];
NSData *hdImageData = UIImageJPEGRepresentation(kImage(@"employee_manage"), 1.0);
WXMiniProgramObject *wxMiniObject = [WXMiniProgramObject object];
wxMiniObject.withShareTicket = YES;
wxMiniObject.webpageUrl = webpageUrl;//兼容低版本的网页链接
wxMiniObject.userName = @"gh_xxxxxx";//微信小程序原始id
wxMiniObject.path = nil;//微信小程序原始路径
wxMiniObject.hdImageData = hdImageData;//微信小程序节点高清大图,小于128K
wxMiniObject.miniProgramType = WXMiniProgramTypePreview;
//WXMiniProgramTypeRelease = 0,//**< 正式版 */WXMiniProgramTypeTest = 1,//**< 开发版 */WXMiniProgramTypePreview = 2,//**< 体验版 */
WXMediaMessage *message = [WXMediaMessage message];
message.mediaObject = wxMiniObject;
message.title = @"微信小程序title";
message.description = @"微信小程序的desc";
message.thumbData = nil;//兼容旧版本节点的图片,小于32k
message.messageExt = @"mo";
SendMessageToWXReq *req = [[SendMessageToWXReq alloc]init];
req.message = message;
req.scene = WXSceneSession;
[WXApi sendReq:req];
-----------------分享到群后,微信小程序获取到的scene=1036,我期望是获取到scene=1044
本文网址:http://www.91bianli.com/weixinxiaochengxu/40748.html