Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question