W
W
weeder2022-01-04 16:12:19
PHP
weeder, 2022-01-04 16:12:19

How to get the wall_post_new event?

Hello! I work with the SimpleVK library for VK.

In the course of work, it was necessary to obtain the ID of the person who sent the post to the wall.
Processing of all events on the wall is enabled, but nothing comes.

In the example, to handle the message event, you need to use the given condition, which works

if ($data->type == 'message_new') {
    $vk->sendMessage(2000001093, "New msg"); // Уведомление о новом сообщении в беседу
}


It is logical that to process new posts you need to use:
if ($data->type == 'wall_post_new') {
    $vk->sendMessage(2000001093, "New Post"); // Уведомление о новом посте
}


But... for some reason nothing comes.

Who knows the solution to the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nnikolyaa, 2022-01-04
@nnikolyaa

Community > Working with API > LongPoll API > Event Types > Wall Posts > Enable "Add"
Or if you are using CallBack
Community > Working with API > CallBack API > Event Types > Wall Posts > Enable "Add"

W
weeder, 2022-01-04
@weeder

61d475fe1cd3e493327164.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question