We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📖 http://mp.weixin.qq.com/wiki/10/0234e39a2025342c17a7d23595c6b40a.html
Example:
$token = 'your-token'; $url = 'https://api.weixin.qq.com/cgi-bin/menu/create?access_token=' . $token; $menu = ['button' => [ [ 'type' => 'click', "name" => "订单查询", 'key' => 'key01', ], [ 'name' => '自助服务', 'sub_button' => [ [ 'type' => 'view', 'name' => '订单系统', 'url' => 'http://i.a.com/', ], [ 'type' => 'click', 'name' => '点赞', 'key' => 'key02', ], ], ], ]]; // json_encode 第2个参数确保中文能正确显示 $postFieldsData = json_encode($menu, JSON_UNESCAPED_UNICODE); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postFieldsData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $info = curl_exec($ch); if (curl_errno($ch)) { echo 'Errno'.curl_error($ch); } curl_close($ch); var_dump($info);
同样调用上面的 munu/create api, 只是讲 menu 内容修改即可。 🔔 修改后的菜单不会立即同步到微信客户端, 有一定时间延迟。
munu/create
The text was updated successfully, but these errors were encountered:
No branches or pull requests
📖 http://mp.weixin.qq.com/wiki/10/0234e39a2025342c17a7d23595c6b40a.html
Example:
修改自定义菜单
同样调用上面的
munu/create
api, 只是讲 menu 内容修改即可。 🔔 修改后的菜单不会立即同步到微信客户端, 有一定时间延迟。The text was updated successfully, but these errors were encountered: