Y
Y
yischyk2019-08-10 15:12:18
PHP
yischyk, 2019-08-10 15:12:18

How to get the id of a published VK post?

When I publish a delayed entry using the wall.post method, I get an array with the id of this post, например, 37but when the post exits the timer, it has a different id, provided that more posts or a post were published before this post was released.
How to get exactly the ID that will be after the release of the delayed publication? Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Serezha, 2019-08-10
@yischyk

It will have a different id even if no new posts have been published before it.
There is no way to know in advance what the id will be, but it will at least be the id of the delayed post + 1.
Then there can be many options, depending on the final task.
If this is a group, then it can be something like this (but this is not accurate):
We write the time of the proposed publication to the database, we receive notifications of new entries by callback, if the time of the entry about which the notification was received and the time of our pending post coincide - we change the ID and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question