WXMiniProgramObject miniProgramObj = new WXMiniProgramObject();
miniProgramObj.webpageUrl = "http://www.qq.com";
miniProgramObj.miniprogramType = WXMiniProgramObject.MINIPTOGRAM_TYPE_RELEASE;
miniProgramObj.userName = "gh_d43f693ca31f";
miniProgramObj.path = "/pages/media";
WXMediaMessage msg = new WXMediaMessage(miniProgramObj);
msg.title = "小程序消息Title";
msg.description = "小程序消息Desc";
msg.thumbData = getThumb();
SendMessageToWX.Req req = new SendMessageToWX.Req();
req.transaction = buildTransaction("webpage");
req.message = msg;
req.scene = SendMessageToWX.Req.WXSceneSession;
api.sendReq(req);
没有可以不填