L
L
lun_a2017-11-16 20:23:16
PHP
lun_a, 2017-11-16 20:23:16

Odnoklassniki api. Connecting a widget to a mobile online game (html). How?

Hi guys ) Such a problem .. I connect the game to OK, mobile.
You need to implement this widget https://apiok.ru/dev/sdk/js-ext/widgets .
I can’t understand how in general and what to put where) yes, yes, I’m a noob)
Can anyone share the finished code or at least tell me how and what to do?
Thank you very much in advance)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fot, 2017-11-28
@fot

Yes, everything seems to be simple. Even in the manual everything is clearly written. You pull widget.getWidgetContent using OKSDK.REST.call(), passing the widget ID in the parameters. Catch the answer in the callback like this:
(data) => {
const widget = OKSDK.Util.decodeUtf8(atob(data));
}
Here is your widget.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question