微擎receiver.php关注事件
2018-02-24 16:00
260 查看
class Delete_gjzhbModuleReceiver extends WeModuleReceiver {
public function receive() {
$type = $this->message['type'];//类型
$event = $this->message['event'];
if (($event == 'subscribe') && ($type == 'subscribe'))//判断
{
$custom = array(
'msgtype' => 'text',
'text' => array('content' => urlencode('欢迎关注')),
'touser' => $this->message['from'],
);
$account_api = WeAccount::create();//实例化
$result = $account_api->sendCustomNotice($custom);//调用微擎接口
// print_r($result);
}
}
}
public function receive() {
$type = $this->message['type'];//类型
$event = $this->message['event'];
if (($event == 'subscribe') && ($type == 'subscribe'))//判断
{
$custom = array(
'msgtype' => 'text',
'text' => array('content' => urlencode('欢迎关注')),
'touser' => $this->message['from'],
);
$account_api = WeAccount::create();//实例化
$result = $account_api->sendCustomNotice($custom);//调用微擎接口
// print_r($result);
}
}
}
相关文章推荐
- 微信公众号取消关注事件要做的处理,php开发公众号
- php开发实现关注公众号事件推送,公众号关注推送图文
- php微信开发之关注事件
- 基于zhphpWeixinApi.class.php 实例二,关注事件
- 一直在关注技术 asp .net delphi java objectc c++ php 以后...
- customPage.class.php可添加js事件的分页类
- 关于PHP你可能不知道的-PHP的事件驱动化设计
- 有趣的onclick事件的设立(请关注三楼说法) by yt
- (转)C# .net微信开发,开发认证,关注触发消息,自动应答,事件响应,自定义菜单
- thinkPHP框架可添加js事件的分页类customPage.class.php完整实例
- 过去十年值得关注的十大技术事件
- 【微信公众号开发】自我学习第二章:关注事件触发的自动回复
- 十款PHP开发者值得关注的编码工具
- php开发微信公众号事件推送
- PR实战:借力携程事件不花钱获得百万关注
- 【BroadcastReceiver】增加 addDataScheme("file") 才能收到SD卡插拔事件的原因分析 -- 浅析android事件过滤策略
- 深入解析PHP的Laravel框架中的event事件操作
- http://bbs.chinaunix.net/viewthread.php?tid=35454 Java Swing 中三种事件处理方法之比较
- php两种按键处理事件
- 微信公众平台开发教程Java版(六) 事件处理(菜单点击/关注/取消关注)