@
@
@SoundAroundMe2015-12-24 23:57:15
Classmates
@SoundAroundMe, 2015-12-24 23:57:15

How to properly generate json mediatopic.post with attachment "type": "photo" (bad photo id problem)?

Following the mediatopic.post instructions, I upload a photo and attach it as an attachment in the json of the form:

{"media":[{"type":"photo","list":[{"id":"===здесь токен загруженного изображения==="},{"photoId":"==здесь id загруженного изображения=="}]}]}

In this case, the photoId variable fully corresponds to the one obtained earlier at the step of obtaining this very ID and download address. I get a "bad photo id"
error . Are there any errors in the manual? What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
oblachniy, 2015-12-25
_

Found the answer myself.
On the same page of the description of the mediatopic.post method, it is written that it is impossible to specify an album when publishing to a group wall and that only one of the parameters in the list must be specified : either id or photoId .
If only instead of the "bad photo id" error, people like me would get the error "Only one of two parameters should be specified".
Removed aid, photoId and everything worked!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question