小編給大家分享一下微信開(kāi)發(fā)之怎樣獲取公眾號(hào),希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
成縣網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián),成縣網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為成縣上1000家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\成都外貿(mào)網(wǎng)站建設(shè)公司要多少錢(qián),請(qǐng)找那個(gè)售后服務(wù)好的成縣做網(wǎng)站的公司定做!本接口將會(huì)提供公眾號(hào)當(dāng)前使用的自定義菜單的配置,如果公眾號(hào)是通過(guò)API調(diào)用設(shè)置的菜單,則返回菜單的開(kāi)發(fā)配置,而如果公眾號(hào)是在公眾平臺(tái)官網(wǎng)通過(guò)網(wǎng)站功能發(fā)布菜單,則本接口返回運(yùn)營(yíng)者設(shè)置的菜單配置。
請(qǐng)注意:
1、第三方平臺(tái)開(kāi)發(fā)者可以通過(guò)本接口,在旗下公眾號(hào)將業(yè)務(wù)授權(quán)給你后,立即通過(guò)本接口檢測(cè)公眾號(hào)的自定義菜單配置,并通過(guò)接口再次給公眾號(hào)設(shè)置好自動(dòng)回復(fù)規(guī)則,以提升公眾號(hào)運(yùn)營(yíng)者的業(yè)務(wù)體驗(yàn)。
2、本接口與自定義菜單查詢(xún)接口的不同之處在于,本接口無(wú)論公眾號(hào)的接口是如何設(shè)置的,都能查詢(xún)到接口,而自定義菜單查詢(xún)接口則僅能查詢(xún)到使用API設(shè)置的菜單配置。
3、認(rèn)證/未認(rèn)證的服務(wù)號(hào)/訂閱號(hào),以及接口測(cè)試號(hào),均擁有該接口權(quán)限。
4、從第三方平臺(tái)的公眾號(hào)登錄授權(quán)機(jī)制上來(lái)說(shuō),該接口從屬于消息與菜單權(quán)限集。
5、本接口中返回的圖片/語(yǔ)音/視頻未臨時(shí)素材(臨時(shí)素材每次獲取都不同,3天內(nèi)有效,通過(guò)素材管理-獲取臨時(shí)素材接口來(lái)獲取這些素材),本接口返回的圖文消息為永久素材素材(通過(guò)素材管理-獲取永久素材接口來(lái)獲取這些素材)。
接口調(diào)用請(qǐng)求說(shuō)明
http請(qǐng)求方式: GET(請(qǐng)使用https協(xié)議)api.weixin.qq.com/cgi-bin/get_current_selfmenu_info?access_token=ACCESS_TOKEN
返回結(jié)果說(shuō)明
如果公眾號(hào)是在公眾平臺(tái)官網(wǎng)通過(guò)網(wǎng)站功能發(fā)布菜單,則本接口返回的自定義菜單配置樣例如下:
{ "is_menu_open": 1, "selfmenu_info": { "button": [ { "name": "button", "sub_button": { "list": [ { "type": "view", "name": "view_url", "url": "http://www.qq.com" }, { "type": "news", "name": "news", "value":"KQb_w_Tiz-nSdVLoTV35Psmty8hGBulGhEdbb9SKs-o", "news_info": { "list": [ { "title": "MULTI_NEWS", "author": "JIMZHENG", "digest": "text", "show_cover": 0, "cover_url": "mmbiz.qpic.cn/mmbiz/GE7et87vE9vicuCibqXsX9GPPLuEtBfXfK0HKuBIa1A1cypS0uY1wickv70iaY1gf3I1DTszuJoS3lAVLvhTcm9sDA/0", "content_url": "http://mp.weixin.qq.com/s?biz=MjM5ODUwNTM3Ng==&mid=204013432&idx=1&sn=80ce6d9abcb832237bf86c87e50fda15#rd", "source_url": "" }, { "title": "MULTI_NEWS1", "author": "JIMZHENG", "digest": "MULTI_NEWS1", "show_cover": 1, "cover_url": "mmbiz.qpic.cn/mmbiz/GE7et87vE9vicuCibqXsX9GPPLuEtBfXfKnmnpXYgWmQD5gXUrEApIYBCgvh3yHsu3ic3anDUGtUCHwjiaEC5bicd7A/0", "content_url": "mp.weixin.qq.com/s?biz=MjM5ODUwNTM3Ng==&mid=204013432&idx=2&sn=8226843afb14ecdecb08d9ce46bc1d37#rd", "source_url": "" } ] } }, { "type": "video", "name": "video", "value": "61.182.130.30/vweixinp.tc.qq.com/1007_114bcede9a2244eeb5ab7f76d951df5f.f10.mp4?vkey=77A42D0C2015FBB0A3653D29C571B5F4BBF1D243FBEF17F09C24FF1F2F22E30881BD350E360BC53F&sha=0&save=1" }, { "type": "voice", "name": "voice", "value": "nTXe3aghlQ4XYHa0AQPWiQQbFW9RVtaYTLPC1PCQx11qc9UB6CiUPFjdkeEtJicn" } ] } }, { "type": "text", "name": "text", "value": "This is text!" }, { "type": "img", "name": "photo", "value": "ax5Whs5dsoomJLEppAvftBUuH7CgXCZGFbFJifmbUjnQk_ierMHY99Y5d2Cv14RD" } ] } }
如果公眾號(hào)是通過(guò)API調(diào)用設(shè)置的菜單,自定義菜單配置樣例如下:
{ "is_menu_open": 1, "selfmenu_info": { "button": [ { "type": "click", "name": "今日歌曲", "key": "V1001_TODAY_MUSIC" }, { "name": "菜單", "sub_button": { "list": [ { "type": "view", "name": "搜索", "url": "http://www.soso.com/" }, { "type": "view", "name": "視頻", "url": "http://v.qq.com/" }, { "type": "click", "name": "贊一下我們", "key": "V1001_GOOD" } ] } } ] } }
參數(shù)說(shuō)明
看完了這篇文章,相信你對(duì)“微信開(kāi)發(fā)之怎樣獲取公眾號(hào)”有了一定的了解,如果想了解更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!