H
H
holdmann2016-01-22 01:09:32
Classmates
holdmann, 2016-01-22 01:09:32

Why does mediatopic.post throw NOT_FOUND: not.found.photouploadinglocal when trying to post a photo?

The sequence of actions is as follows:

$photoUrl = $client->call('photosV2.getUploadUrl', array('count' => 1));

I get a list of field names and a URL where to send a POST with a file.
I upload photos and get image tokens (I don't commit).
{
  "photos": {
    "8y8CvT4Ix1m0ndfyI/qtCYrJ+pB43lXdSHvtCctVnrD6fwbvsDgbdA\u003d\u003d": {
      "token": "gxglwv2vMn+Kew1TjKAAFBRpHiwHwxEUxPsSOuuwo1CQKovl95/eruQdEd+Ki5GhSpb2Aip3LPW2KSh1auD9PhJcV1o1f2dUHiUUxylc61sOR/UG02sGbthzwB0MBBqX"
    }
  }
}

I form a request to mediatopic.post.
$params = array(
            'attachment' => json_encode($media),
            'type' => 'GROUP_THEME',
            'gid' => 53476453187693

);

$result = $client->call('mediatopic.post', $params);

Where attachment:
{
  "media": [
    {
      "type": "photo",
      "list": [
        {
          "id": "gxglwv2vMn+Kew1TjKAAFBRpHiwHwxEUxPsSOuuwo1CQKovl95\/eruQdEd+Ki5GhSpb2Aip3LPW2KSh1auD9PhJcV1o1f2dUHiUUxylc61sOR\/UG02sGbthzwB0MBBqX"
        }
      ]
    }
  ]
}

As a result, I get the message:
"NOT_FOUND: not.found.photouploadinglocal"
What could be wrong?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vjacheslav Kanivetc, 2016-01-26
@holdmann

Most likely, at the stage of obtaining the URL, the group ID is not indicated.
At the stage of obtaining a URL for uploading a photo, in the parameters, you must pass the ID of the group to which the post of the media topic will be made (you do not need to specify the album ID of "images from themes")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question