W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
使用接口創(chuàng)建自定義菜單后,開發(fā)者還可使用接口查詢自定義菜單的結(jié)構(gòu)。另外請(qǐng)注意,在設(shè)置了個(gè)性化菜單后,使用本自定義菜單查詢接口可以獲取默認(rèn)菜單和全部個(gè)性化菜單信息。
請(qǐng)求說明
http請(qǐng)求方式:GET https://api.weixin.qq.com/cgi-bin/menu/get?access_token=ACCESS_TOKEN
返回說明(無個(gè)性化菜單時(shí))
對(duì)應(yīng)創(chuàng)建接口,正確的Json返回結(jié)果: { "menu": { "button": [ { "type": "click", "name": "今日歌曲", "key": "V1001_TODAY_MUSIC", "sub_button": [ ] }, { "type": "click", "name": "歌手簡(jiǎn)介", "key": "V1001_TODAY_SINGER", "sub_button": [ ] }, { "name": "菜單", "sub_button": [ { "type": "view", "name": "搜索", "url": "http://www.soso.com/", "sub_button": [ ] }, { "type": "view", "name": "視頻", "url": "http://v.qq.com/", "sub_button": [ ] }, { "type": "click", "name": "贊一下我們", "key": "V1001_GOOD", "sub_button": [ ] } ] } ] } }
返回說明(有個(gè)性化菜單時(shí))
{ "menu": { "button": [ { "type": "click", "name": "今日歌曲", "key": "V1001_TODAY_MUSIC", "sub_button": [ ] } ], "menuid": 208396938 }, "conditionalmenu": [ { "button": [ { "type": "click", "name": "今日歌曲", "key": "V1001_TODAY_MUSIC", "sub_button": [ ] }, { "name": "菜單", "sub_button": [ { "type": "view", "name": "搜索", "url": "http://www.soso.com/", "sub_button": [ ] }, { "type": "view", "name": "視頻", "url": "http://v.qq.com/", "sub_button": [ ] }, { "type": "click", "name": "贊一下我們", "key": "V1001_GOOD", "sub_button": [ ] } ] } ], "matchrule": { "group_id": 2, "sex": 1, "country": "中國", "province": "廣東", "city": "廣州", "client_platform_type": 2 }, "menuid": 208396993 } ]
}
注:menu為默認(rèn)菜單,conditionalmenu為個(gè)性化菜單列表。字段說明請(qǐng)見個(gè)性化菜單接口頁的說明。
使用網(wǎng)頁調(diào)試工具調(diào)試該接口
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: