Answer the question
In order to leave comments, you need to log in
Why is the FAPI.UI function not called from IFrame?
When trying to call FAPI.UI.showInvite() from an IFrame, the invite does not open, an error occurs in API_callback with the code -1 and the description: "UI methods are available only for apps running on OK portal". I'm using FAPI5. The FAPI and FAPI.Client methods are called normally. There is not a word in the documentation about restrictions and ways to bypass them. How do I call invites and post media?
Answer the question
In order to leave comments, you need to log in
The problem turned out to be in the way initialization was called - init was called by name:
...
var methodName = "init";
var params = [api_server, apiconnection];
...
params.push(callbackSuccess);
params.push(callbackFail);
...
FAPI[methodName].apply(this, params);
...
...
FAPI.init(params[0], params[1], callbackSuccess, callbackFail);
...
Judging by the message, the application still does not start in the iframe of classmates on ok.ru/game/.... Perhaps you've added another iframe where you haven't passed enough parameters to initialize the widgets OK?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question