A
A
Anton Seredny2016-08-06 22:48:15
In contact with
Anton Seredny, 2016-08-06 22:48:15

What is the algorithm for checking for new posts in a group in VK?

There is a task - to repost all new posts from my VK group to the site.
I can't figure out how to correctly check if a new post has appeared, so as not to repost one post to myself twice, or vice versa, not to miss a post.
I thought to get posts using wall.get , check the id of the last post in the group, if it differs from the last one on the site - publish.
But I do not know how to get around the above difficulties.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2016-08-06
@smidl

We make a request to the VK API
We get posts from the wall
We select only those whose ID is greater than the last published one We
publish on the site

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question