Example #1
0
 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());
 }
Example #2
0
 public function setPostParameter($key, $value)
 {
     parent::setPostParameter($key, $value);
     $this->prepare();
 }