微信开发之获取公众号配置
本接口将会提供公众号当前使用的自定义菜单的配置,如果公众号是通过API调用设置的菜单,则返回菜单的开发配置,而如果公众号是在公众平台官网通过网站功能发布菜单,则本接口返回运营者设置的菜单配置。 请注意: 1、第三方平台开发者可以通过本接口,在旗下公众号将业务授权给你后,立即通过本接口检测公众号的自定义菜单配置,并通过接口再次给公众号设置好自动回复规则,以提升公众号运营者的业务体验。 接口调用请求说明 http请求方式: GET(请使用https协议)api.weixin.qq.com/cgi-bin/get_current_selfmenu_info?access_token=ACCESS_TOKEN 返回结果说明 如果公众号是在公众平台官网通过网站功能发布菜单,则本接口返回的自定义菜单配置样例如下: { "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/GE7et87vE9vicuCibqXsX9GPPLuEtBfXfKnmnpXYgWmQD5gXUrEApIYBCgvh2yHsu3ic3anDUGtUCHwjiaEC5bicd7A/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" } ] }} 如果公众号是通过API调用设置的菜单,自定义菜单配置样例如下: { "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" } ] } } ] }} 参数说明 【相关推荐】 1. 特别推荐:“php程序员工具箱”V0.1版本下载 2. 微信公众号平台源码下载 3. 微信投票源码下载 以上就是微信开发之获取公众号配置的详细内容,更多请关注php中文网其它相关文章! |
- 上一篇:入门C#微信开发第一步
- 下一篇:微信开发之接收文本消息的接口和参数