M
M
maksustoff2017-04-09 22:31:59
JSON
maksustoff, 2017-04-09 22:31:59

What is the error in calling the vk api stored procedure?

Hello.
Created a stored procedure for faster getting a list of friends (for 25 users at the same time) and writing their IDs to an array.

var a=Args.users.split(",");
var i=0;
var result=[];
var tmp=[];
while(i<a.length)
{
    tmp=[API.friends.get({"user_id":a[i]})]@.items[0];
    result=result+tmp;
    i=i+1;
}
return result;

By manually setting the parameters (in the application settings, directly on the VK website), everything works successfully (in the picture: users = 1,2)
87ef1b1bcf954bc0a2e481008dd47f01.jpg
Sending a request using the link, I get an empty response (I received a token first, there is no problem with the token).
The request is like this:
https://api.vk.com/method/execute.getFriends?&access_token=aaaaaabbbbbbbccccc&users=1,23

In response I get:
{"response":""}
What is the problem, please help. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tom Nolane, 2017-04-10
@maksustoff

https://api.vk.com/method/execute.getFriends?&access_token=aaaaaabbbbbbbccccc&users=1,23

between execute.getFriends?&access_tokenyou ?& . It is not right. Remove the ampersand from the query and add"&v=5.63"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question