您的位置:首页 > 编程语言 > PHP开发

微擎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);
}

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: