9 require_once dirname(dirname(__FILE__)) .
'/services/OdnoklassnikiOAuthService.php';
13 protected $scope =
'VALUABLE ACCESS';
17 if ($this->scope ==
'VALUABLE ACCESS')
26 $sig = strtolower(md5(
'application_key='.$this->client_public.
'client_id='.$this->client_id.
'fields=url_profileformat=JSONmethod=users.getInfouids='.$this->attributes[
'id'].md5($this->access_token.$this->client_secret)));
28 $info = $this->
makeRequest(
'http://api.odnoklassniki.ru/fb.do', array(
30 'method' =>
'users.getInfo',
32 'uids' => $this->attributes[
'id'],
33 'fields' =>
'url_profile',
35 'application_key' => $this->client_public,
36 'client_id' => $this->client_id,
37 'access_token' => $this->access_token,
41 preg_match(
'/\d+\/{0,1}$/',$info[0]->url_profile, $matches);
42 $this->attributes[
'id'] = (int)$matches[0];
43 $this->attributes[
'url'] = $info[0]->url_profile;