Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
CustomMailruService.php
1 <?php
2 /**
3  * An example of extending the provider class.
4  *
5  * @author ChooJoy <choojoy.work@gmail.com>
6  * @link http://code.google.com/p/yii-eauth/
7  * @license http://www.opensource.org/licenses/bsd-license.php
8  */
9 
10 require_once dirname(dirname(__FILE__)) . '/services/MailruOAuthService.php';
11 
13 
14  protected function fetchAttributes() {
15  $info = (array)$this->makeSignedRequest('http://www.appsmail.ru/platform/api', array(
16  'query' => array(
17  'uids' => $this->uid,
18  'method' => 'users.getInfo',
19  'app_id' => $this->client_id,
20  ),
21  ));
22 
23  $info = $info[0];
24 
25  $this->attributes['id'] = $info->uid;
26  $this->attributes['first_name'] = $info->first_name;
27  $this->attributes['photo'] = $info->pic;
28  }
29 
30 }