Answer the question
In order to leave comments, you need to log in
Is it possible to send requests to the OK API (REST API) from the HTML page of an external site via JS?
Is it possible to send requests to the OK API from the HTML page of an external site via JS? I have already tried a bunch of options with jsonp (crossdomain request) - callback is not called.
$.ajax({
url: 'http://api.ok.ru/fb.do',
jsonp: false,
jsonpCallback: 'callback',
dataType: "jsonp",
cache: true,
data: params,
success: callback,
error: function (x, t, m) {
if (t == 'timeout') {
request();
}
},
timeout: 30000
});
Answer the question
In order to leave comments, you need to log in
REST api is always available, but in the case of an external page, at least OAUTH authorization is
required first apiok.ru/wiki/pages/viewpage.action?pageId=81822117 ?pageId=75989046
An example (php) can be viewed from https://github.com/apiok/php_sdk
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question