S
S
sergeymitugov2017-06-01 16:21:42
Classmates
sergeymitugov, 2017-06-01 16:21:42

Error request to api classmates?

When requested, it gives an error: Invalid signature

$access_token=$input->json->get('access_token');

    $sign = md5("application_key=1251321856format=jsonmethod=users.getCurrentUser" . md5("
                 {$access_token}$secret_key"));
    
    
    $params = array(
      'method'          => 'users.getCurrentUser',
      'access_token'    => $access_token,
      'application_key' =>$application_key,
      'format'          => 'json',
      'sig'             => $sign
    );
      $userInfo = json_decode(file_get_contents('http://api.odnoklassniki.ru/fb.do' . '?' 
      . urldecode(http_build_query($params))), true);
      print_r($userInfo);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question