Всем привет
Открываю в браузере
http://www.odnoklassniki.ru/oauth/au...scope=VALUABLE ACCESS;SET STATUS;PHOTO CONTENT;MESSAGING&response_type=code&redirect_uri=http://site.com/index.php
В файте site.com/index.php пишу

PHP код:
<?php
$code = $_GET['code'];
$data = array(
'code'=>$code,
'client_secret'=>'XXXXXXXXXXXXXXXXXXXXXXXX',
'client_id'=>'xxxxxx',
'redirect_uri'=>'http://site.com/index.php',
'grant_type' => 'authorization_code'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://api.odnoklassniki.ru/oauth/token.do');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-Type: application/x-www-form-urlencoded'));
print curl_exec($ch);
curl_close ($ch);
Выбает HTTP Status 400 - Provide OAUTH request parameters!
Может кто работал с OAuth на одноклассниках и сможет подсказать в чем проблема.