自定义菜单查询接口
(→返回结果) |
(→返回结果) |
||
第29行: | 第29行: | ||
{ | { | ||
"menu": { | "menu": { | ||
− | + | "button": [ | |
− | + | { | |
− | + | "type": "click", | |
− | + | "name": "获取优惠券", | |
− | + | "key": "get_groupon" | |
− | + | }, | |
− | + | { | |
− | + | "type": "click", | |
− | + | "name": "查询客服电话", | |
− | + | "key": "the_big_brother_need_your_phone" | |
− | + | }, | |
− | + | { | |
− | + | "name": "菜单", | |
− | + | "sub_button": [ | |
− | + | { | |
− | + | "type": "view", | |
− | + | "name": "网上4S店", | |
− | + | "url": "http://apps.weibo.com/1838358847/8rYu1uHD" | |
− | + | }, | |
− | + | { | |
− | + | "type": "view", | |
− | + | "name": "砍价团", | |
− | + | "url": "http://apps.weibo.com/1838358847/8s1i6v74" | |
− | + | }, | |
− | + | { | |
− | + | "type": "click", | |
− | + | "name": "么么哒", | |
− | + | "key": "memeda" | |
− | + | } | |
− | + | ] | |
− | + | } | |
− | + | ] | |
− | + | } | |
} | } | ||
− | |||
// 失败返回 | // 失败返回 |
2014年6月3日 (二) 21:24的版本
自定义菜单查询接口
自定义菜单查询接口
URL
https://m.api.weibo.com/2/messages/menu/show.json
HTTP请求方式
GET
是否需要登录
是
关于登录授权,参见 如何登录授权
接口请求参数
必选 | 类型及范围 | 说明 | |
---|---|---|---|
access_token | true | string | 在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 获取粉丝服务平台开发接口的access token。 |
返回结果
// 成功返回 { "menu": { "button": [ { "type": "click", "name": "获取优惠券", "key": "get_groupon" }, { "type": "click", "name": "查询客服电话", "key": "the_big_brother_need_your_phone" }, { "name": "菜单", "sub_button": [ { "type": "view", "name": "网上4S店", "url": "http://apps.weibo.com/1838358847/8rYu1uHD" }, { "type": "view", "name": "砍价团", "url": "http://apps.weibo.com/1838358847/8s1i6v74" }, { "type": "click", "name": "么么哒", "key": "memeda" } ] } ] } } // 失败返回 { "request": "/2/messages/menu/show.json", "error_code": 264XX, "error": "error message." }