M
M
Mintonist2015-06-16 10:50:08
Classmates
Mintonist, 2015-06-16 10:50:08

Does stream.publish work for flash/html applications published on the site?

We received a letter from Odnoklassniki with a request to check a number of methods in their applications, including stream.publish.
Checked - everything is according to the documentation apiok.ru/wiki/display/api/stream.publish+ru (call confirmation, adding resign)
In response, we always get:
{"error_code":100,"error_msg":"PARAM : APP image should has one of the following types [.jpg, .jpeg, .png]","error_data":null}
A couple of months ago everything worked.
We tried different pictures and formats from someone else's and our own hosting. Naturally, the pictures are ordinary - jpg
What could be the matter?
Thank you!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
Eugene, 2015-06-18
@Onni

In addition, as I understand it, FAPI.UI.postMediatopic does not allow you to specify a link to an image, but only the id of the photos uploaded to the user's album

It just allows:
FAPI.UI.postMediatopic({
  "type": "text",
  "text": "Hello world!"
  },
  {
  "type": "app",
  "text": "Message title",
  "images": [
  {
    "url": "http://...",
  }
  ]
]);

V
Vjacheslav Kanivetc, 2015-06-16
@Vjaka

Quote from stream.publish documentation (warning title)
This is a deprecated API method. Instead, use one of the methods for posting media topics:
JS: FAPI.UI.postMediatopic
REST: post widget (for posting to a user) or mediatopic.post (for posting to groups)
In your case, apiok.ru/wiki/display/api/FAPI.UI.postMediatopic+ru
For cross-platform applications - there is an example on viral widgets

D
DeXVinogradov, 2016-02-23
@DeXVinogradov

I have another related question. I use postMediatopic, in attachment I shove app and app-ref.

{
        "type": "app",
        "text": message_,
        "images": [
            {
                "url": image_,
                "mark": "",
                "title": name_
            }
        ],
        "actions": [
                {"text":name_,
                    "mark": ""}
        ]
 
    },
        {
            "type": "app-ref",
            "appId": appId_
        }

For appId, I specify the numeric part, which is located after https://ok.ru/game/...
In the answer I get this - NaN error {"code":100,"message":"APP_REF: app #1244556800 not found" }
Could this be because the app hasn't been moderated yet? Or maybe I screwed something up? Maybe there is another way to insert a link to the application.

M
Mintonist, 2015-06-16
@Mintonist

I don't want to change what works. especially since many games have been around for many years. It follows from the letter and documentation that the method is supported, albeit outdated. In some of my applications, it works correctly even now.
In addition, as I understand it, FAPI.UI.postMediatopic does not allow you to specify a link to an image, but only the id of the photos uploaded to the user's album, which is not suitable for us, because. All pictures for posting are stored on our hosting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question