Skip to content

akostylev0/vk-callback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VkCallback

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);

About

Async Callback Server and Api client for rapid VK applications development.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages