I
I
Ilya Kochkin2018-10-14 09:40:12
In contact with
Ilya Kochkin, 2018-10-14 09:40:12

How to save photo via photos.saveMarketAlbumPhoto and execute method?

The photos.saveMarketAlbumPhoto vk API method does not work if it is called via the execute method.
- I get the server url - photos.getMarketAlbumUploadServer
- I upload photos with curl
- I prepare parameters and pass them in different ways:

$param = array(
  "group_id" 	=> vk_gid,
  "photo" 	=> $data->photo,
  "server" 	=> $data->server,
  "hash" 	=> $data->hash
);

// Doesn't work
var_dump($pack->execute('return API.photos.saveMarketAlbumPhoto('.json_encode($param).');'));
// Works
var_dump($pack->send('photos.saveMarketAlbumPhoto', $param));
Errors
[error_code] => 129
[error_msg] => Invalid photo

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question