ezaki113 / vk-callback
Async Callback Server and Api client for rapid VK applications development.
v0.0.1
2016-06-23 12:30 UTC
Requires
- php: ~7.0
- icicleio/http: ~2.0
This package is not auto-updated.
Last update: 2025-03-27 03:54:03 UTC
README
Async server and client for VK Callback API built on top of Icicle.
INSTALL
composer require ezaki113/vk-callback
TLDR
<?php declare (strict_types = 1); use VkCallback\CallbackServer; use VkCallback\Client; require __DIR__ . '/vendor/autoload.php'; $server = new CallbackServer(); $client = new Client('your token'); $server->confirm('your confirm callback token'); $server->on('wall_reply_new', function (array $data) use ($client) { yield from $client->call('wall.deleteComment', [ 'owner_id' => -$data['group_id'], 'comment_id' => $data['object']['id'] ]); }); $server->run(7070);