U
U
uranus2352014-08-15 20:27:19
PHP
uranus235, 2014-08-15 20:27:19

How to correctly compose a vk search query?

Still, I regretted the Vkontakte API and began to use it. After long painful rewriting of the code, I was able to implement music search through VK on the site.
It's time to search for the video. Everything works on the same principle, only the request is different.
Here is the request:

$xml_response = Send_Post("https://api.vk.com/method/video.search.xml?access_token=$a_token&q=$fquery&count=1&sort=2&adult=0&v=5.24"); 

$parse = simplexml_load_string($xml_response);

the same Curl method is used that was used for music (music search works)
But when you try to save the parse variable on the site, it returns empty.
Well, what is wrong with my request?
$a_token = вечный токен после авторизации, вытягиваю из куки
$fquery = переформированный запрос ( The Beatles => The+Beatles )

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
uranus235, 2014-08-17
@uranus235

issue closed: forgot to request video permission

H
Hazrat Hajikerimov, 2014-08-15
@hazratgs

Judging by this question , there may be problems with the Vk API

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question