WeChat.ServerMessage.XmlMessage (wechat v0.2.0)
回复推送消息
Link to this section Summary
Link to this section Functions
Link to this function
reply_image(to_openid, from_wx_no, timestamp, media_id)
回复图片消息 - 官方文档
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>12345678</CreateTime>
<MsgType><![CDATA[image]]></MsgType>
<Image>
<MediaId><![CDATA[media_id]]></MediaId>
</Image>
</xml>
Link to this function
reply_msg(signature, nonce, timestamp, encrypt_content)
回包加密 - 官方文档
<xml>
<Encrypt><![CDATA[encrypt_content]]></Encrypt>
<MsgSignature><![CDATA[signature]]></MsgSignature>
<TimeStamp>timestamp</TimeStamp>
<Nonce><![CDATA[nonce]]></Nonce>
</xml>
Link to this function
reply_music(to_openid, from_wx_no, timestamp, title, desc, music_url, hq_music_url, thumb_media_id)
回复音乐消息 - 官方文档
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>12345678</CreateTime>
<MsgType><![CDATA[music]]></MsgType>
<Music>
<Title><![CDATA[title]]></Title>
<Description><![CDATA[description]]></Description>
<MusicUrl><![CDATA[MUSIC_Url]]></MusicUrl>
<HQMusicUrl><![CDATA[HQ_MUSIC_Url]]></HQMusicUrl>
<ThumbMediaId><![CDATA[media_id]]></ThumbMediaId>
</Music>
</xml>
Link to this function
reply_news(to_openid, from_wx_no, timestamp, article_items)
回复图文消息 - 官方文档
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>12345678</CreateTime>
<MsgType><![CDATA[news]]></MsgType>
<ArticleCount>1</ArticleCount>
<Articles>
<item>
<Title><![CDATA[title1]]></Title>
<Description><![CDATA[description1]]></Description>
<PicUrl><![CDATA[picurl]]></PicUrl>
<Url><![CDATA[url]]></Url>
</item>
</Articles>
</xml>
Link to this function
reply_text(to_openid, from_wx_no, timestamp, content)
回复文本消息 - 官方文档
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>12345678</CreateTime>
<MsgType><![CDATA[text]]></MsgType>
<Content><![CDATA[你好]]></Content>
</xml>
Link to this function
reply_video(to_openid, from_wx_no, timestamp, media_id, title, desc)
回复视频消息 - 官方文档
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>12345678</CreateTime>
<MsgType><![CDATA[video]]></MsgType>
<Video>
<MediaId><![CDATA[media_id]]></MediaId>
<Title><![CDATA[title]]></Title>
<Description><![CDATA[description]]></Description>
</Video>
</xml>
Link to this function
reply_voice(to_openid, from_wx_no, timestamp, media_id)
回复语音消息 - 官方文档
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>12345678</CreateTime>
<MsgType><![CDATA[voice]]></MsgType>
<Voice>
<MediaId><![CDATA[media_id]]></MediaId>
</Voice>
</xml>
Link to this function
transfer_customer_service(to_openid, from_wx_no, timestamp)
消息转发客服消息 - 官方文档
<xml>
<ToUserName><![CDATA[touser]]></ToUserName>
<FromUserName><![CDATA[fromuser]]></FromUserName>
<CreateTime>1399197672</CreateTime>
<MsgType><![CDATA[transfer_customer_service]]></MsgType>
</xml>
Link to this function
transfer_customer_service(to_openid, from_wx_no, timestamp, kf_account)
消息转发到指定客服 - 官方文档
<xml>
<ToUserName><![CDATA[touser]]></ToUserName>
<FromUserName><![CDATA[fromuser]]></FromUserName>
<CreateTime>1399197672</CreateTime>
<MsgType><![CDATA[transfer_customer_service]]></MsgType>
<TransInfo>
<KfAccount><![CDATA[test1@test]]></KfAccount>
</TransInfo>
</xml>