惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
Martin Fowler
Martin Fowler
博客园_首页
量子位
T
Tailwind CSS Blog
博客园 - Franky
G
Google Developers Blog
D
DataBreaches.Net
Vercel News
Vercel News
B
Blog
Recent Announcements
Recent Announcements
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
爱范儿
爱范儿
博客园 - 【当耐特】
The Cloudflare Blog
H
Help Net Security
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
C
Check Point Blog
有赞技术团队
有赞技术团队
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - s1ihome

弹框居中的方法 如何 clone git 项目到一个非空目录 Uiautomatorviewer报错:Unexpected error while obtaining UI hierarchy java.lang.reflect.InvocationTargetException 常见银行卡号账号长度参考表 TP5.0 数据库查询is not null vscode 中sftp配置 移动端H5上传图片并压缩上传 Thinkphp关联模型使用 centos 7 pdo thinkphp 5 where 组合条件map数组or [转]处理上百万条的数据库如何提高处理查询速度 连接oracle读取数据 SQL SERVER批量修改表名前缀 php导出excel java开发微信公众平台备忘 AngularJS小试牛刀 spring mvc开发过程知识点记录 Dynamic Virtual Channels 木马的隐藏方式
微信公众平台项目中遇到的小问题40016,Invalid button size
s1ihome · 2015-04-12 · via 博客园 - s1ihome

刚辞职的同事用JAVA给客户开发的微信公众平台,今天晚上客户给我打电话说出现错误,此时我正跟朋友在外吃饭,联系已辞职的同事也联系不上,便答应回去之后我给调试看下。

问明客户说就修改了appkey和appsecret两个串值,试了下公众号才看出请求的url中的appid还是老的,便利用开发者接口测试工具经过多次实验后才发现原来是创建自定义菜单的json字符串错误,提交的json字符串格式如:

{"menu":{"button":[{"name":"功能","sub_button"。。。。。。。。。

如此提交便出现error code 40016, Invlid button size 的错误,正确的应为去掉

{"menu":..}这个

如下

{"button":[{"name":"功能","sub_button":[{"type":"view","name":"订单号绑定","url":"https:\/\/open.weixin.qq.com\/connect\/oauth2\/authorize?appid=wx4a48823aa0c3d015&redirect_uri=http%3a%2f%2fwww.5454555.com\/wechat%2fm%2fuser!prebuyvip.do&response_type=code&scope=snsapi_base&state=123#wechat_redirec……[]}]},{"name":"帮助","sub_button":[{"type":"click","name":"如何绑定","key":"如何绑定","sub_button":[]}]}]}