Example #1
0
 /**
  * Request and store access token (self::accessToken) for self::userId
  * @return $this
  */
 public function queryAccessToken()
 {
     if (!Loader::includeModule('socialservices')) {
         $this->errorCollection->add(array(new Error(Loc::getMessage('DISK_DROPBOX_HANDLER_ERROR_NOT_INSTALLED_SOCSERV'), self::ERROR_NOT_INSTALLED_SOCSERV)));
         return false;
     }
     $dropboxOAuth = new \CSocServDropboxAuth($this->userId);
     //this bug. SocServ fill entityOAuth in method getUrl.....
     $dropboxOAuth->getUrl('modal');
     $this->accessToken = $dropboxOAuth->getStorageToken();
     return $this;
 }