예제 #1
0
 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);
 }
예제 #2
0
 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'));
 }
예제 #3
0
 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');
 }
예제 #4
0
 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);
     }
 }