M
M
Maxim2013-11-28 17:31:18
In contact with
Maxim, 2013-11-28 17:31:18

Why does the photo go to the album, but is not published on the wall?

Good evening. I send photos via OpenAPI. Everything goes well - the photo ends up in the album.
Next, directly from the chrome console, I call the method like this:

VK.Api.call("wall.post", {owner_id: -609XXXXX, from_group: 1, attachments: "photo609XXXXX_315912228"}, function(r){
    console.log(r);
});

What I get is undefined in the body of the message post (undefined = no text, but after undefined there should be a picture) I went to the VKontakte
documentation and took the photo parameters from there photo100172_166443618,photo66748_265827614 Substituted them into my request - only one photo. OK. I assume that one of the photos has already been deleted. There is only one 100% working photo left - photo66748_265827614 I am writing a request:

VK.Api.call("wall.post", {owner_id: -60992840, from_group: 1, attachments: "photo66748_265827614"}, function(r){
    console.log(r);
});

I get undefined + McDonald's photo. Those. all OK. I click "ok" in the pop-up confirmation window of the post on the wall - profit. There is a post. There is a photo. Everyone is happy.
Help me out, comrades. What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2013-11-29
@maxfarseer

Found the answer!
Although the photo after uploading comes in the format photoGOIDMYPAGE_IDPHOTO, you need to save it to the group like this

photoGROUPID_PHOTOID, причем GROUPID со знаком минус.

Y
yanisbiziuk, 2015-01-12
@yanisbiziuk

And my problem is that I upload a photo for display on the wall in a group, everything goes without errors.
But when I post it through wall.post, it has already been deleted, what could be the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question