asp 微信接口post图文消息返回{"errcode":44003,"errmsg":"empty news data hint: [vkc9MA0689e2
<%
Function GetBody(news,IMG_TOKEN)
Set https = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
With https
.Open "Post", "https://api.weixin.qq.com/cgi-bin/media/uploadnews?access_token="&IMG_TOKEN, False
.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
.Send "{""""articles"": [""{""""thumb_media_id"":"""&tt&""",""""author"":"""&author&""",""""title"":"""&title&""",""""content_source_url"":"""&content_source_url&""",""""content"":"""&tmpstr&""",""""digest"":"""&digest&""",""""show_cover_pic"":1""}""]""}"
GetBody = .ResponseBody
End With
GetBody = BytesToBstr(GetBody,"UTF-8")
Set https = Nothing
End Function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Response.Write GetBody(news,IMG_TOKEN)
%>