以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]模板消息报错 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=136535) |
-- 作者:2474842866 -- 发布时间:2019/6/15 11:23:00 -- [求助]模板消息报错 我在写模板消息,模板已经建立好了 模板id也进行了更改,但是在执行时,总是报错 不知道什么地方出错了,代码: Dim url As String = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={0}" Dim hc As New HttpClient(CExp(url, Functions.Execute("GetAccessToken"))) Dim jo As New JObject Dim ja As New JArray jo("touser") = "ofjtFwBSZ5cNqTKLSKx2TNEAxfBI" jo("template_id") = "eMuOnDjlsEk41QtKE4tkh-Yb09lqCIq769vYKpzR9yQ" \'模板ID jo("url") = "http://www.foxtable.com" jo("data") = New JObject() jo("data")("name") = New JObject() jo("data")("name")("value") = "Foxtable" jo("data")("name")("color") = "#173177" jo("data")("number") = New JObject() jo("data")("number")("value") = "2" jo("data")("number")("color") = "#173177" jo("data")("expDate") = New JObject() jo("data")("expDate")("value") = "2019年12月27日" jo("data")("expDate")("color") = "#173177" jo("data")("expDate") = New JObject() jo("data")("expDate")("value") = "2019年12月27日" jo("data")("expDate")("color") = "#173177" jo("data")("remark") = New JObject() jo("data")("remark")("value") = "如有疑问,可联系客服QQ:800014337" jo("data")("remark")("color") = "#173177" hc.content = jo.Tostring() jo = JObject.Parse(hc.getdata) If jo("errcode") = "0" Then MessageBox.show("模版消息发送成功!") Else Messagebox.Show(jo.ToString) End If |
-- 作者:有点蓝 -- 发布时间:2019/6/15 11:27:00 -- 提示openid不正确 jo("touser") = "ofjtFwBSZ5cNqTKLSKx2TNEAxfBI"
|