Refreshes a remote post's comment thread.
The refresh runs asynchronously. There are two ways to use this method:
- If you need the end result, generate a random string and pass it to
request_id. Then keep repeating this request with delays (5 seconds recommended) passing the samerequest_iduntil you receive a response wherestatusisdone. At which point you would tell the user that there are new comments and call wall.getComments to reload the thread. - If you would like to simply trigger a refresh and don't care about its result, omit the
request_id.
Only call this methods on posts whose can_load_remote_comments field is true.
This method requires the following permissions: wall:read.
Available since API version 1.1.
Parameters
post_id
integer
The identifier of the post.
request_id
string
In case you need to keep track of the refresh, your client-side identifier for this refresh request.
Result
If request_id is omitted, returns true.
If request_id is present, returns an object:
status
enum
The current status of the refresh task.
running– The refresh has still not completed. Call the method again after a delay.done– The refresh has finished.
new_comment_count
integer
(non-negative)
If status is done, how many new comments were loaded. Only reload the comment thread if this is greater than 0.