微信发送文本消息方法代码分享如下:
CRMComm wxComm = new CRMComm(); //获取AccessToKen类 string error = string.Empty; string accessToken = wxComm.GetAccessToken(out error); //CustomApi.SendText(accessToken, CookieHelper.GetCookie("openid"), "nihao"); string urlformat = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token={0}"; var data = new { touser = CookieHelper.GetCookie("openid"), msgtype = "text", text = new { content = "你好吗,吃了吗" } }; Senparc.Weixin.CommonAPIs.CommonJsonSend.Send(accessToken, urlformat, data);
Copyright © 2004-2024 Ynicp.com 版权所有 法律顾问:建纬(昆明)律师事务所 昆明市网翼通科技有限公司 滇ICP备08002592号-4