A
A
Alexander2014-04-24 13:09:44
PHP
Alexander, 2014-04-24 13:09:44

How to get information that a user left a post on the wall (VK API)?

Hello.
This morning, on one of the projects, the following task arose:
a user who is authorized in my application leaves a post on his wall, I need to get information about this in my application.
The bottom line is this: the user posts something, vk immediately notifies my script that the user has posted something.
Of course, you can use a script to check the number of posts on the wall every N seconds and compare with what is in the database, but if there are a lot of users, then this is a very large load on the server at the time of the poll, and you need to do this often ... It is
very interesting to listen to your suggestions about the implementation of this functionality or reducing the load on the server when polling all users for new records.
Thank you for your time.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kazhuravlev, 2014-04-24
@Taraba4

The vk server does not know how to notify you about the actions of your users.
vk also does not have a Streaming API (like Twitter for example), so periodic requests will be the solution here.

D
Dmitry, 2014-04-24
@DimaXVII

As far as I know, they do not have triggers that would pull your script

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question