protected function getOAuthUrlBySocServ() { $socGoogleOAuth = new CSocServLiveIDOAuth($this->getUser()->getId()); $liveIdOAuthUrl = $socGoogleOAuth->getUrl('modal', CWebDavEditSkyDrive::$SCOPE); return $liveIdOAuthUrl; }
/** * 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_ONEDRIVE_HANDLER_ERROR_NOT_INSTALLED_SOCSERV'), self::ERROR_NOT_INSTALLED_SOCSERV))); return false; } $socLiveIdOAuth = new \CSocServLiveIDOAuth($this->userId); //this bug. SocServ fill entityOAuth in method getUrl..... $socLiveIdOAuth->getUrl('modal', array('wl.contacts_skydrive', 'wl.skydrive_update', 'wl.skydrive')); $this->accessToken = $socLiveIdOAuth->getStorageToken(); return $this; }