asp 微信接口post图文消息返回{"errcode":44003,"errmsg":"empty news data hint: [vkc9MA0689e2

thaihs1 2016-04-20 09:54:34
<%
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)
%>
...全文
1051 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧