A
A
Alexander Farber2019-08-17 19:48:48
Classmates
Alexander Farber, 2019-08-17 19:48:48

Why does FAPI.UI.postMediatopic work with type: “link” but not with type: “app”?

Hello!
I have a word game that has been running on Odnoklassniki for more than a year, and the sale of virtual goods also worked there without problems (I actually turned it off in January due to tedious reporting).
When I call the following code, it works and posts to https://ok.ru/feed
5d582f8d81fad395824657.png

FAPI.UI.postMediatopic({media: [
        {
                type: "link", 
                noImage: true, 
                imageUrl: "https://slova.de/words/board-492x364.php?gid=81236",
                url: "https://slova.de/game-81236",
        }
]});

But the following code doesn't work -
5d582f9de632b171488146.png
FAPI.UI.postMediatopic({media: [
        {
                type: "app",
                text: "Игра 81236",
                images: [{
                        url: "https://slova.de/words/board-492x364.php?gid=81236",
                        title: "Игра 81236"
                }]
        }
]});

At the same time, the callback function writes error topicFailed to the console or sometimes writes in more detail:
{"code":100,"message":"APP image has unsupported url https://slova.de/words/board-492x364.php?gid=81236"}

function API_callback(method, result, data) {
        if ("postMediatopic" == method) {
                console.log(result);
                console.log(data);
        }
}

What could be the reason?
I read the documentation for mediatopic.post and FAPI.UI.postMediatopic , someone else's code on Github too...
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Farber, 2019-08-21
@afarber

Problem solved by adding "&fake=fake.png" to my URL
I changed it to "&fake=" + (+new Date()) + ".png" to avoid caching

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question