[[+content_image]]
M
M
mirexes2017-03-09 10:25:03
In contact with
mirexes, 2017-03-09 10:25:03

How to save a photo on VK through execute?

Hello.
I have such a task, I need to save several photos in VKontakte through the execute method.
I do this

var b=[{"photo":"748167e711:y","sizes":[["s","637718897","3d17f","b-BX1sfsevI",60,75],["m","637718897","3d180","I0Ob3RY9hjo",104,130],["x","637718897","3d181","tjNMvSWyizQ",483,604],["y","637718897","3d182","JUdrMyKjuh0",533,666],["o","637718897","3d183","xWpDixiMEGU",130,163],["p","637718897","3d184","vK-LKl3A17o",200,250],["q","637718897","3d185","6IgMLLyJAYg",320,400],["r","637718897","3d186","c8zFZYKmOTM",510,637]],"kid":"9211a7fe51dc221ff6baa9c7f6a12ee8","debug":"xsymyxyyyoypyqyry"}];
var a=API.photos.save({"album_id":242386440,"group_id":123885059,"server":637718,"photos_list":b,"hash":"9c01f547134f71446cfdb61fb7b400ac","latitude":0,"longitude":0,"caption":"","v":"5.62"});
 
 return a;

In response, I receive an error message
"error_code": 100,
"error_msg": "One of the parameters specified was missing or invalid: photos_list is invalid",
so after all, I substitute the photos_list of the one that was sent to me by VK.
If I do the same data in the usual way, it works, it saves the photo, but it doesn’t exit through execute.
Tell me what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
A
Alexander Lebedev, 2017-03-09
@lebedev444

I'm a little off topic, but based on general knowledge, I think the line --latitude":0,"longitude":0--- is not correct, what are the coordinates? latitude is all, longitude is all, is this a request to the server? coordinates.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question