custom_services/CustomOdnoklassnikiService.php
protected function getRealIdAndUrl() {
		$info = $this->makeSignedRequest('http://api.odnoklassniki.ru/fb.do', array(
			'query' => array(
				'method' => 'users.getInfo',
				'uids' => $this->attributes['id'],
				'fields' => 'url_profile',
				'format' => 'JSON',
				'application_key' => $this->client_public,
				'client_id' => $this->client_id,
			),
		));

		preg_match('/\d+\/{0,1}$/', $info[0]->url_profile, $matches);
		$this->attributes['id'] = (int)$matches[0];
		$this->attributes['url'] = $info[0]->url_profile;
	}
protected function getRealIdAndUrl() {
		$info = $this->makeSignedRequest('http://api.odnoklassniki.ru/fb.do', array(
			'query' => array(
				'method' => 'users.getInfo',
				'uids' => $this->attributes['id'],
				'fields' => 'url_profile',
				'format' => 'JSON',
				'application_key' => $this->client_public,
				'client_id' => $this->client_id,
			),
		));

		preg_match('/\d+\/{0,1}$/', $info[0]->url_profile, $matches);
		$this->attributes['id'] = (int)$matches[0];
		$this->attributes['url'] = $info[0]->url_profile;
	}
protected function getRealIdAndUrl ( ) { $ info = $ this -> makeSignedRequest ( 'http://api.odnoklassniki.ru/fb.do' , array ( 'query' => array ( 'method' => 'users.getInfo' , 'uids' => $ this -> attributes [ 'id' ] , 'fields' => 'url_profile' , 'format' => 'JSON' , 'application_key' => $ this -> client_public , 'client_id' => $ this -> client_id , ) , ) ) ; preg_match ( '/\d+\/{0,1}$/' , $ info [ 0 ] -> url_profile , $ matches ) ; $ this -> attributes [ 'id' ] = ( int ) $ matches [ 0 ] ; $ this -> attributes [ 'url' ] = $ info [ 0 ] -> url_profile ; }
Avable only if VALUABLE ACCESS is on
you should ask for enable this scope for odnoklassniki administration
Avable only if VALUABLE ACCESS is on you should ask for enable this scope for odnoklassniki administration