道招

易信公众帐号添加自定义菜单

如果您发现本文排版有问题,可以先点击下面的链接切换至老版进行查看!!!

易信公众帐号添加自定义菜单

首先我们设置菜单的内容 [code lang="php"] $data = array( "button"=>array( array( "name"=>"点击测试", "sub_button"=>array( array( "name"=>"点击1", "type"=>"click", "key"=>"http://www.baidu.com", ), array( "name"=>"点击2", "type"=>"click", "key"=>"http://www.taobao.com", ) ), ), array( "name"=>"查看测试", "type"=>"view", "key"=>"help.php", ), array( "name"=>"查看yx", "type"=>"view", "key"=>",help.yx", ) ) ); [/code] 然后 [code lang="php"]$url = "https://api.yixin.im/cgi-bin/menu/create?access_token=".$access_token; $jsondata = json_encode($data);[/code] $access_token为你的access_token 然后将$data的数据POST到$url就行了,根据返回码查看操作是否成功
更新时间:
上一篇:下一篇:

相关文章

关注道招网公众帐号