D
D
daniilsilantyev2015-05-17 16:08:00
API
daniilsilantyev, 2015-05-17 16:08:00

Odnoklassniki API script initialization error, what should I do?

html file:

<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="style.css" />
    <script type="text/javascript" src="http://api.odnoklassniki.ru/js/fapi5.js" defer="defer"></script>
 
<script type = "text/JavaScript" defer="defer">  
        var rParams = FAPI.Util.getRequestParameters(); console.log(rParams);
        FAPI.init(rParams["api_server"], rParams["apiconnection"],
                function() { console.log('ok')},
                function( error ) {  console.log(error); }
        );
</script>
    <script type="text/javascript" src="script.js" defer="defer"></script>
    
    <title>Example 1</title>
</head>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Valery Ozhiganov, 2015-05-19
@daniilsilantyev

Most likely you are just trying to open a page with this code, that's why it doesn't work.
You need to create an application, in the settings set the Application URL with the address where this code is, and then the application will open in a frame

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question