日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

微信的消息内容

發布時間:2024/1/1 编程问答 50 豆豆
生活随笔 收集整理的這篇文章主要介紹了 微信的消息内容 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

消息內容

微信一般消息內容

{"FromUserName": "","ToUserName": "","Content": "","StatusNotifyUserName": "","ImgWidth": 0,"PlayLength": 0,"RecommendInfo": {},"StatusNotifyCode": 0,"NewMsgId": "","Status": 0,"VoiceLength": 0,"ForwardFlag": 0,"AppMsgType": 0,"Ticket": "","AppInfo": {},"Url": "","ImgStatus": 0,"MsgType": 0,"ImgHeight": 0,"MediaId": "","MsgId": "","FileName": "","HasProductId": 0,"FileSize": "","CreateTime": 0,"SubMsgType": 0 }

微信回復的所有消息都遵循這一格式,下面將就每種消息類型具體分析。

消息的具體內容

本段部分參考Urinx的Github并修改。

微信初始化消息

MsgType: 51 FromUserName: 自己ID ToUserName: 自己ID StatusNotifyUserName: 最近聯系的聯系人ID Content:<msg><op id='4'><username># 最近聯系的聯系人filehelper,xxx@chatroom,wxid_xxx,xxx,...</username><unreadchatlist><chat><username># 朋友圈MomentsUnreadMsgStatus</username><lastreadtime>1454502365</lastreadtime></chat></unreadchatlist><unreadfunctionlist># 未讀的功能賬號消息,群發助手,漂流瓶等</unreadfunctionlist></op></msg>

文本消息

MsgType: 1 FromUserName: 發送方ID ToUserName: 接收方ID Content: 消息內容

圖片消息

MsgType: 3 FromUserName: 發送方ID ToUserName: 接收方ID MsgId: 用于獲取圖片 Content:<msg><img length="6503" hdlength="0" /><commenturl></commenturl></msg>

itchat添加了Text鍵,鍵值為下載該圖片的方法。

小視頻消息

MsgType: 62 FromUserName: 發送方ID ToUserName: 接收方ID MsgId: 用于獲取小視頻 Content:<msg><img length="6503" hdlength="0" /><commenturl></commenturl></msg>

itchat添加了Text鍵,鍵值為下載該視頻的方法。

地理位置消息

MsgType: 1 FromUserName: 發送方ID ToUserName: 接收方ID Content: http://weixin.qq.com/cgi-bin/redirectforward?args=xxx

itchat添加了Text鍵,鍵值為該地點的文本形式。

名片消息

MsgType: 42 FromUserName: 發送方ID ToUserName: 接收方ID Content:<?xml version="1.0"?><msg bigheadimgurl="" smallheadimgurl="" username="" nickname="" shortpy="" alias="" imagestatus="3" scene="17" province="" city="" sign="" sex="1" certflag="0" certinfo="" brandIconUrl="" brandHomeUrl="" brandSubscriptConfigUrl="" brandFlags="0" regionCode="" />RecommendInfo:{"UserName": "xxx", # ID"Province": "xxx", "City": "xxx", "Scene": 17, "QQNum": 0, "Content": "", "Alias": "xxx", # 微信號"OpCode": 0, "Signature": "", "Ticket": "", "Sex": 0, # 1:男, 2:女"NickName": "xxx", # 昵稱"AttrStatus": 4293221, "VerifyFlag": 0}

itchat添加了Text鍵,鍵值為該調用add_friend需要的屬性。

語音消息

MsgType: 34 FromUserName: 發送方ID ToUserName: 接收方ID MsgId: 用于獲取語音 Content:<msg><voicemsg endflag="1" cancelflag="0" forwardflag="0" voiceformat="4" voicelength="1580" length="2026" bufid="216825389722501519" clientmsgid="49efec63a9774a65a932a4e5fcd4e923filehelper174_1454602489" fromusername="" /></msg>

itchat添加了Text鍵,鍵值為下載該語音文件的方法。

動畫表情

MsgType: 47 FromUserName: 發送方ID ToUserName: 接收方ID Content:<msg><emoji fromusername = "" tousername = "" type="2" idbuffer="media:0_0" md5="e68363487d8f0519c4e1047de403b2e7" len = "86235" productid="com.tencent.xin.emoticon.bilibili" androidmd5="e68363487d8f0519c4e1047de403b2e7" androidlen="86235" s60v3md5 = "e68363487d8f0519c4e1047de403b2e7" s60v3len="86235" s60v5md5 = "e68363487d8f0519c4e1047de403b2e7" s60v5len="86235" cdnurl = "http://emoji.qpic.cn/wx_emoji/eFygWtxcoMF8M0oCCsksMA0gplXAFQNpiaqsmOicbXl1OC4Tyx18SGsQ/" designerid = "" thumburl = "http://mmbiz.qpic.cn/mmemoticon/dx4Y70y9XctRJf6tKsy7FwWosxd4DAtItSfhKS0Czr56A70p8U5O8g/0" encrypturl = "http://emoji.qpic.cn/wx_emoji/UyYVK8GMlq5VnJ56a4GkKHAiaC266Y0me0KtW6JN2FAZcXiaFKccRevA/" aeskey= "a911cc2ec96ddb781b5ca85d24143642" ></emoji> <gameext type="0" content="0" ></gameext></msg>

itchat添加了Text鍵,鍵值為下載該圖片表情的方法。

由于版權問題,部分微信商店提供的表情是無法下載的,注意。

普通鏈接或應用分享消息

MsgType: 49 AppMsgType: 5 FromUserName: 發送方ID ToUserName: 接收方ID Url: 鏈接地址 FileName: 鏈接標題 Content:<msg><appmsg appid="" sdkver="0"><title></title><des></des><type>5</type><content></content><url></url><thumburl></thumburl>...</appmsg><appinfo><version></version><appname></appname></appinfo></msg>

音樂鏈接消息

MsgType: 49 AppMsgType: 3 FromUserName: 發送方ID ToUserName: 接收方ID Url: 鏈接地址 FileName: 音樂名AppInfo: # 分享鏈接的應用{Type: 0, AppID: wx485a97c844086dc9}Content:<msg><appmsg appid="wx485a97c844086dc9" sdkver="0"><title></title><des></des><action></action><type>3</type><showtype>0</showtype><mediatagname></mediatagname><messageext></messageext><messageaction></messageaction><content></content><contentattr>0</contentattr><url></url><lowurl></lowurl><dataurl>http://ws.stream.qqmusic.qq.com/C100003i9hMt1bgui0.m4a?vkey=6867EF99F3684&amp;guid=ffffffffc104ea2964a111cf3ff3edaf&amp;fromtag=46</dataurl><lowdataurl>http://ws.stream.qqmusic.qq.com/C100003i9hMt1bgui0.m4a?vkey=6867EF99F3684&amp;guid=ffffffffc104ea2964a111cf3ff3edaf&amp;fromtag=46</lowdataurl><appattach><totallen>0</totallen><attachid></attachid><emoticonmd5></emoticonmd5><fileext></fileext></appattach><extinfo></extinfo><sourceusername></sourceusername><sourcedisplayname></sourcedisplayname><commenturl></commenturl><thumburl>http://imgcache.qq.com/music/photo/album/63/180_albumpic_143163_0.jpg</thumburl><md5></md5></appmsg><fromusername></fromusername><scene>0</scene><appinfo><version>29</version><appname>搖一搖搜歌</appname></appinfo><commenturl></commenturl></msg>

群消息

MsgType: 1 FromUserName: @@xxx ToUserName: @xxx Content:@xxx:<br/>xxx

itchat增加了三個群聊相關的鍵值:
* isAt: 判斷是否@本號
* ActualNickName: 實際NickName
* Content: 實際Content

紅包消息

MsgType: 49 AppMsgType: 2001 FromUserName: 發送方ID ToUserName: 接收方ID Content: 未知

系統消息

MsgType: 10000 FromUserName: 發送方ID ToUserName: 自己ID Content:"你已添加了 xxx ,現在可以開始聊天了。""如果陌生人主動添加你為朋友,請謹慎核實對方身份。""收到紅包,請在手機上查看"

總結

以上是生活随笔為你收集整理的微信的消息内容的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。