打印出构建自定义菜单的报文
{ "type":"click",
"name":"说明001",
"key":"001"},
{ "type":"view",
"name":"说明002",
"url":"http://www.baidu.com/"},
{ "type":"null", "name":"sub_caidan001",}
符合它这种文档格式
FUCK,create菜单之后报错了
{"errcode":40016,"errmsg":"invalid button size hint: [jpZpIA0632vr18]"}
{ "type":"click", "name":"说明001", "key":"001"},{ "type":"view", "name":"说明002", "url":"http://www.baidu.com/"}
不合法的按钮个数
落下了外面的那一层,其实它这个提示也不是太好,有些问题它提示不出来
加上外面button那一层之后再次执行还是报错
{"errcode":65318,"errmsg":"must use utf-8 charset hint: [sUL4la0308vr23]"}
{"button":[{ "type":"click", "name":"说明001", "key":"001"},{ "type":"view", "name":"说明002", "url":"http://www.baidu.com/"}}]
修改了外面button那一层之后再次执行还是报错
{"errcode":65318,"errmsg":"must use utf-8 charset hint: [CXQHOA0639vr23]"}
{"button":[{ "type":"click", "name":"说明001", "key":"001"},{ "type":"view", "name":"说明002", "url":"http://www.baidu.com/"}]}
修改输出流的编码为UTF-8就可以了
{"errcode":0,"errmsg":"ok"}
{"button":[{ "type":"click", "name":"说明001", "key":"001"},{ "type":"view", "name":"说明002", "url":"http://www.baidu.com/"}]}
手机微信端已经添加了菜单了