以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 微信企业号发送信息出错 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=108160) |
-- 作者:baoxyang -- 发布时间:2017/10/17 15:00:00 -- 微信企业号发送信息出错 Dim ur As String = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token={0}" Dim hc As new HttpClient(Cexp(ur,Functions.Execute("GetAccessToken"))) Dim jo As New JObject jo("touser") = "WangGaoPing" jo("msgtype") = "text" jo("agentid") = 1 jo("text") = New JObject jo("text")("content") = "测试微信开发" hc.Content = jo.ToString jo = JObject.Parse(hc.GetData) If jo("errcode") = "0" Then MessageBox.show("消息发送成功!") Else MessageBox.show(jo.ToString) End If
|
-- 作者:有点蓝 -- 发布时间:2017/10/17 16:19:00 -- 检查“GetAccessToken”函数使用的开发者ID和Secret是agentid为1 的Secret。 |