private function exchangeCodeForAccessToken() { $link = new Link(Graph::getGraphUrl('oauth/access_token')); $link->addQueryParameter('client_id', $this->config->getAppID()); $link->addQueryParameter('client_secret', $this->config->getAppSecret()); $link->addQueryParameter('code', $this->getCode()); $link->addQueryParameter('redirect_uri', $this->getRedirectUrl()); $request = new RequestMaker(Method::METHOD_GET, $link); $request->setSecurityCertificate(__DIR__ . '/Certificates/DigiCertHighAssuranceEVRootCA.pem'); $transporter = $this->getTransporter($request); $transporter->send(); $this->response = $transporter->getResponse(); $this->responseData = json_decode($this->response->getBody()); }
public function __construct(Config $config, Scope $scope, $redirectUrl = null) { parent::__construct($config, $scope, $redirectUrl); $this->get(null, $this->fields); }