public function __construct() { parent::__construct(); $OAuth2 = nxcSocialNetworksOAuth2::getInstanceByType('instagram'); $OAuth2Token = $OAuth2->getToken()->Token; $this->API = array('key' => $OAuth2->appSettings['key'], 'secret' => $OAuth2->appSettings['secret'], 'token' => $OAuth2Token); }
public function __construct() { parent::__construct(); $OAuth2 = nxcSocialNetworksOAuth2::getInstanceByType('twitter'); $OAuth2Token = $OAuth2->getToken(); $this->API = new TwitterOAuth($OAuth2->appSettings['key'], $OAuth2->appSettings['secret'], $OAuth2Token->attribute('token'), $OAuth2Token->attribute('secret')); }
public function __construct() { parent::__construct(); $OAuth2 = nxcSocialNetworksOAuth2::getInstanceByType('facebook'); $this->API = new Facebook($OAuth2->appSettings['key'], $OAuth2->appSettings['secret']); $OAuth2Token = $OAuth2->getToken(); $this->acessToken = $OAuth2Token->attribute('token'); }
public function __construct() { parent::__construct(); $OAuth2 = nxcSocialNetworksOAuth2::getInstanceByType('google'); $token = $OAuth2->getToken(); $tmp = json_decode($token->attribute('token'), true); try { $OAuth2->connection->refreshToken($tmp['refresh_token']); $this->API = new apiPlusService($OAuth2->connection); } catch (Exception $e) { eZDebug::writeError($e->getMessage(), self::$debugMessagesGroup); } }