Skip to content

MenuAPI

JPCui edited this page Feb 6, 2018 · 3 revisions

菜单管理

        Button sub1 = new Button();
        sub1.setType("view");
        sub1.setName("View Book");
        sub1.setUrl("http://www.baidu.com/");

        Button sub2 = new Button();
        sub2.setType("click");
        sub2.setName("Click");
        sub2.setKey("click-01");

        Button sub3 = new Button();
        sub3.setType("pic_weixin");
        sub3.setName("PIC");
        sub3.setKey("click-02");

        MenuButtons btn1 = new MenuButtons();
        btn1.setButton(new Button[]{sub1, sub2, sub3});

        String accessToken = "XXXXXXXXXX";

        MenuAPI.menuCreate(accessToken, btn1);

API 列表

Clone this wiki locally