Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
Protected Member Functions | List of all members
CustomTwitterService Class Reference
Inheritance diagram for CustomTwitterService:
TwitterOAuthService EOAuthService EAuthServiceBase IAuthService IAuthService

Protected Member Functions

 fetchAttributes ()

Additional Inherited Members

- Public Member Functions inherited from TwitterOAuthService
 authenticate ()
- Protected Attributes inherited from TwitterOAuthService
 $name = 'twitter'
 $title = 'Twitter'
 $type = 'OAuth'
 $jsArguments = array('popup' => array('width' => 900, 'height' => 550))
 $key = ''
 $secret = ''
 $providerOptions

Detailed Description

An example of extending the provider class.

Author
Maxim Zemskov nodge.nosp@m.@yan.nosp@m.dex.r.nosp@m.u http://www.opensource.org/licenses/bsd-license.php

Definition at line 12 of file CustomTwitterService.php.

Member Function Documentation

CustomTwitterService::fetchAttributes ( )
protected

Fetch attributes array.

Returns
boolean whether the attributes was successfully fetched.

Reimplemented from TwitterOAuthService.

Definition at line 14 of file CustomTwitterService.php.

References EOAuthService\makeSignedRequest().

{
$info = $this->makeSignedRequest('https://api.twitter.com/1/account/verify_credentials.json');
$this->attributes['id'] = $info->id;
$this->attributes['name'] = $info->name;
$this->attributes['url'] = 'http://twitter.com/account/redirect_by_id?id='.$info->id_str;
$this->attributes['username'] = $info->screen_name;
$this->attributes['language'] = $info->lang;
$this->attributes['timezone'] = timezone_name_from_abbr('', $info->utc_offset, date('I'));
$this->attributes['photo'] = $info->profile_image_url;
}

The documentation for this class was generated from the following file: