<?php $query = file_get_contents("https://api.vk.com/method/wall.getComments?owner_id=55692777&post_id=3335118"); $query = json_decode($query); var_dump($query); ?> 

Returns

 Access denied: post was not found check post_id param 

Where did you make a mistake? Thanks to all.

  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

Error in owner_id value: user with id55692777 does not exist.

Perhaps you are not interested in the user, but in a community with such an id. In this case, in the wall.getComments() method, you must pass its id with a minus sign:

 https://api.vk.com/method/wall.getComments?owner_id=-55692777&post_id=3335118&v=5.58 

So it works.

Also, do not forget to transfer the API version in the v parameter, since in the future, requests without specified versions will return an error .

  • @terron If you have something to add, issue a different answer and not edits of the current ... - Naumov