Answer the question
In order to leave comments, you need to log in
How to extract data from a post in VK?
Good time of day everyone. You need to do something like this: 1. A link to a post in VK is transmitted. 2. The code stretches the post data according to the variables that I specify. For example, the name and surname of the person who made the post into one variable, the text of the post into another variable. Then more comments are written to a multidimensional array, they also have - who made the comment, the text of the comment, and perhaps also take the date of creation. Who knows how to do this, or which way to look to do it? Maybe there are some methods in the VK API that will come in handy. I know that you can take the whole page and work with its DOM in JS. I would like to hear if there are any easier options. All this needs to be done in JS. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
https://vk.com/dev/wall
everything you need is there) and of course it will be better to work through api and not parse the entire page
You will have to use PHP or any other server language, such requests to the API cannot be sent from the browser, only from Standalone applications (including servers), but you can already "communicate" with your server through JS.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question