你好,我用收下方法,消息能推送成功了,但是,偶尔会出现推送失败的情况,这个时间我用什么方法比较好,实现再次推送,比如失败的情况下重复推送三次,以最大可能保证推送成功
Dim
jo As New JObject
jo("touser") = "ofjtFwBSZ5cNqTKLSKx2TNEAxfBI"
jo("msgtype") = "text"
jo("text") = New
JObject
jo("text")("content") = "您好,我是Foxtable"
Dim URL As
String = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token={0}"
Dim hc As
New HttpClient(CExp(URL, Functions.Execute("GetAccessToken")))
hc.Content = jo.ToString()
jo = JObject.Parse(hc.GetData())
If jo("errcode") =
"0"
Then
MessageBox.Show("消息发送成功")
Else
MessageBox.show("消息发送失败,原因:"
& vbcrlf &
jo("errmsg").ToString)
End
If