C
C
che_aa2020-01-04 00:58:18
Python
che_aa, 2020-01-04 00:58:18

Logpoll api vk to user account?

Is there a method that allows you to connect logpoll api to a group (for example, for a bot) are there similar methods for regular accounts?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey, 2020-01-04
@che_aa

https://github.com/python273/vk_api/blob/master/ex...
But VK banned messages for such accounts.

K
Kirill Minovsky, 2020-01-19
@Runnin

Here on this library: https://github.com/digitalstars/simplevk
Here is the code for creating a bot on a user's account for version 2.14

require_once('vendor/autoload.php');
use DigitalStar\vk_api\vk_api;
use DigitalStar\vk_api\LongPoll;
$vk = vk_api::create('login', 'password', VERSION);//или используйте токен вместо лог/пас
$vk = new LongPoll($vk);
$vk->listen(function()use($vk){ //longpoll для пользователя
    $vk->on('message_new', function($data)use($vk) { //обработка входящих сообщений
        $vk->initVars($id, $message);
        $vk->reply($message);
    });
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question