-
Notifications
You must be signed in to change notification settings - Fork 3
/
menuDelete.php
45 lines (40 loc) · 1.01 KB
/
menuDelete.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
require 'weixin.class.php';
$ret=wxcommon::getToken();
$ACCESS_TOKEN=$ret['access_token'];
$menuPostData='{
"button":[
{
"type":"view",
"name":"发布活动",
"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx42dbf69f8939e9a8&redirect_uri=http://lovepingping.applinzi.com/publish.php&response_type=code&scope=snsapi_base&state=1"
},
{
"type":"click",
"name":"参与活动",
"key":"JOIN"
},
{
"name":"更多",
"sub_button":[
{
"type":"click",
"name":"我",
"key":"ME"
},
{
"type":"click",
"name":"赞一下我们",
"key":"ENCOURAGE"
}]
}]
}';
// create new menu
$wxmenu=new wxmenu($ACCESS_TOKEN);
$create=$wxmenu->createMenu($menuPostData);
//get current menu
//$get=$wxmenu->getMenu();
//var_dump($get);
//delete current menu
$del=$wxmenu->deleteMenu();
var_dump($del);