自定义菜单查询接口

跳转到: 导航, 搜索
(接口请求参数)
(返回结果)
第29行: 第29行:
 
{
 
{
 
     "menu": {
 
     "menu": {
        "button": [
+
      "button": [
            {
+
        {
                "type": "click",
+
            "type": "click",
                "name": "今日歌曲",
+
            "name": "获取优惠券",
                "key": "V1001_TODAY_MUSIC"
+
            "key": "get_groupon"
            },
+
        },
            {
+
        {
                "type": "click",
+
            "type": "click",
                "name": "歌手简介",
+
            "name": "查询客服电话",
                "key": "V1001_TODAY_SINGER"
+
            "key": "the_big_brother_need_your_phone"
            },
+
        },
            {
+
        {
                "name": "菜单",
+
            "name": "菜单",
                "sub_button": [
+
            "sub_button": [
                    {
+
                {
                        "type": "view",
+
                    "type": "view",
                        "name": "搜索",
+
                    "name": "网上4S店",
                        "url": "http://www.soso.com/"
+
                    "url": "http://apps.weibo.com/1838358847/8rYu1uHD"
                    },
+
                },
                    {
+
                {
                        "type": "view",
+
                    "type": "view",
                        "name": "视频",
+
                    "name": "砍价团",
                        "url": "http://v.qq.com/"
+
                    "url": "http://apps.weibo.com/1838358847/8s1i6v74"
                    },
+
                },
                    {
+
                {
                        "type": "click",
+
                    "type": "click",
                        "name": "赞一下我们",
+
                    "name": "么么哒",
                        "key": "V1001_GOOD"
+
                    "key": "memeda"
                    }
+
                }
                ]
+
            ]
            }
+
        }
        ]
+
    ]
    }
+
  }
 
}
 
}
 +
  
 
// 失败返回
 
// 失败返回

2014年6月3日 (二) 21:23的版本

自定义菜单查询接口

自定义菜单查询接口

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."
}