示例#1
0
 protected function __construct()
 {
     parent::__construct();
     $redirectURL = '/nxc_social_network_token/get_access_token/linkedin';
     eZURI::transformURI($redirectURL, false, 'full');
     $this->connection = new LinkedIn(array('appKey' => $this->appSettings['key'], 'appSecret' => $this->appSettings['secret'], 'callbackUrl' => $redirectURL));
 }
示例#2
0
 protected function __construct()
 {
     parent::__construct();
     $redirectURL = '/nxc_social_network_token/get_access_token/google';
     eZURI::transformURI($redirectURL, false, 'full');
     $this->connection = new apiClient(array('cacheClass' => 'apiFileCache', 'authClass' => 'apiOAuth2', 'ioClass' => 'apiCurlIO'));
     $this->connection->setClientId($this->appSettings['key']);
     $this->connection->setClientSecret($this->appSettings['secret']);
     $this->connection->setRedirectUri($redirectURL);
     $this->connection->setApplicationName('eZ Publish');
     $this->connection->setAccessType('offline');
     $this->setState();
 }