-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
64 lines (56 loc) · 1.37 KB
/
index.php
File metadata and controls
64 lines (56 loc) · 1.37 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
define("TOKEN", "showking");//自己定义的token 就是个通信的私钥
require_once 'wxModel.php';
//=========================
////这里是正式公众号!
//$appId= 'wx0f57a95d244904a6' ;
//$appSecret = '90ef5c49bffe3750dfe5fb33caa5ae3b';
//====================
//测试使用配置
$appId= 'wx402a31a201a2c9b9' ;
$appSecret = 'd4624c36b6795d1d99dcf0547af5443d'; //测试用的
//====================
$wechatObj = new wechatCallbackapiTest( $appId, $appSecret );
$wechatObj->responseMsg();
$data = <<<EOT
{
"button":[
{
"name":"测试1",
"sub_button":[
{
"type":"click",
"name":"子菜单名1",
"key":"name1"
},
{
"type":"click",
"name":"子菜单名2",
"key":"name2"
}
]
},
{
"type":"view",
"name":"aboutus",
"url":"http://www.baidu.com"
},
{
"name":"测试1",
"sub_button":[
{
"type":"click",
"name":"子菜单名1",
"key":"name1"
},
{
"type":"click",
"name":"子菜单名2",
"key":"name2"
}
]
}
]
}
EOT;
$wechatObj->createMenu( $data );