微信公众号中的消息类型
MsgType 【event】
1.unsubscribe 取消关注
<?xml version="1.0" encoding="utf-8"?>
<xml>
<ToUserName><![CDATA[gh_22736e7e5679]]></ToUserName>
<FromUserName><![CDATA[ociip1cY31Nl9jOq3ENbQAQEooiI]]></FromUserName>
<CreateTime>1543031206</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[unsubscribe]]></Event>
<EventKey><![CDATA[]]></EventKey>
</xml>
2.subscribe关注
<?xml version="1.0" encoding="utf-8"?>
<xml>
<ToUserName><![CDATA[gh_22736e7e5679]]></ToUserName>
<FromUserName><![CDATA[ociip1cY31Nl9jOq3ENbQAQEooiI]]></FromUserName>
<CreateTime>1543031324</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[subscribe]]></Event>
<EventKey><![CDATA[]]></EventKey>
</xml>
3.CLICK点击
<?xml version="1.0" encoding="utf-8"?>
<xml>
<ToUserName><![CDATA[gh_22736e7e5679]]></ToUserName>
<FromUserName><![CDATA[ociip1cY31Nl9jOq3ENbQAQEooiI]]></FromUserName>
<CreateTime>1543031358</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[CLICK]]></Event>
<EventKey><![CDATA[V1001_COUNT]]></EventKey>
</xml>
4.SCAN扫码
<?xml version="1.0" encoding="utf-8"?>
<xml>
<ToUserName><![CDATA[gh_22736e7e5679]]></ToUserName>
<FromUserName><![CDATA[ociip1cY31Nl9jOq3ENbQAQEooiI]]></FromUserName>
<CreateTime>1543032160</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[SCAN]]></Event>
<EventKey><![CDATA[ociip1ZNZRZR6EuxHd0JXyiQg1iE]]></EventKey>
<Ticket><![CDATA[gQGE8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAyYXpDLTVqT0VlRmwxMGtWdmhzY3QAAgQUrPdbAwQAjScA]]></Ticket>
</xml>
MsgType 【text】
<?xml version="1.0" encoding="utf-8"?>
<xml>
<ToUserName><![CDATA[gh_22736e7e5679]]></ToUserName>
<FromUserName><![CDATA[ociip1cY31Nl9jOq3ENbQAQEooiI]]></FromUserName>
<CreateTime>1543031692</CreateTime>
<MsgType><![CDATA[text]]></MsgType>
<Content><![CDATA[你好]]></Content>
<MsgId>6627270654256482055</MsgId>
</xml>
MsgType 【voice】
<?xml version="1.0" encoding="utf-8"?>
<xml>
<ToUserName><![CDATA[gh_22736e7e5679]]></ToUserName>
<FromUserName><![CDATA[ociip1cY31Nl9jOq3ENbQAQEooiI]]></FromUserName>
<CreateTime>1543031726</CreateTime>
<MsgType><![CDATA[voice]]></MsgType>
<MediaId><![CDATA[kJrNmz_hRrfwdAaDYD0vcHf8rrVp24Djv4ysM2MVyQ2X3gWx9ZLsWyWmPx3MVq1l]]></MediaId>
<Format><![CDATA[amr]]></Format>
<MsgId>6627270800285370121</MsgId>
<Recognition><![CDATA[]]></Recognition>
</xml>
MsgType 【image】
<?xml version="1.0" encoding="utf-8"?>
<xml>
<ToUserName><![CDATA[gh_22736e7e5679]]></ToUserName>
<FromUserName><![CDATA[ociip1cY31Nl9jOq3ENbQAQEooiI]]></FromUserName>
<CreateTime>1543031789</CreateTime>
<MsgType><![CDATA[image]]></MsgType>
<PicUrl><![CDATA[http://mmbiz.qpic.cn/mmbiz_jpg/0dDHCuba7H6iaCUQIQDKd4m2y9UtQwDgN7gb2cake7Tgoe5LsxuANfl3obicxqCicc502ngg4SvEjtynmIkKJX7vw/0]]></PicUrl>
<MsgId>6627271070868309772</MsgId>
<MediaId><![CDATA[yTnqFo7p6rDqttx--yj0WzUkf21yVvvsaNk896GGGHIqzQx2DdbFW8WjD-vot6G5]]></MediaId>
</xml>
MsgType 【video】
<?xml version="1.0" encoding="utf-8"?>
<xml>
<ToUserName><![CDATA[gh_22736e7e5679]]></ToUserName>
<FromUserName><![CDATA[ociip1cY31Nl9jOq3ENbQAQEooiI]]></FromUserName>
<CreateTime>1543031840</CreateTime>
<MsgType><![CDATA[video]]></MsgType>
<MediaId><![CDATA[P57rdEOvyFq5M4snSTpRaYHR4gtr5RKaTLnV8z52mDm64aDyLCqVPlUBxLww1YQ0]]></MediaId>
<ThumbMediaId><![CDATA[cvoGQ_dz9yIwW11TSNxrDUzkStjyRwJCzvH7ldo_EyHE51zrgUtKUIKo7JgD5TVA]]></ThumbMediaId>
<MsgId>6627271289911641869</MsgId>
</xml>