55 protected $decodedBody = [];
77 $this->request = $request;
79 $this->httpStatusCode = $httpStatusCode;
80 $this->headers = $headers;
92 return $this->request;
102 return $this->request->getApp();
112 return $this->request->getAccessToken();
122 return $this->httpStatusCode;
132 return $this->headers;
152 return $this->decodedBody;
162 return $this->request->getAppSecretProof();
172 return isset($this->headers[
'ETag']) ? $this->headers[
'ETag'] :
null;
182 return isset($this->headers[
'Facebook-API-Version']) ? $this->headers[
'Facebook-API-Version'] :
null;
192 return isset($this->decodedBody[
'error']);
202 throw $this->thrownException;
210 $this->thrownException = FacebookResponseException::create($this);
220 return $this->thrownException;
236 $this->decodedBody = json_decode($this->body,
true);
238 if ($this->decodedBody ===
null) {
239 $this->decodedBody = [];
240 parse_str($this->body, $this->decodedBody);
241 } elseif (is_bool($this->decodedBody)) {
245 $this->decodedBody = [
'success' => $this->decodedBody];
246 } elseif (is_numeric($this->decodedBody)) {
247 $this->decodedBody = [
'id' => $this->decodedBody];
250 if (!is_array($this->decodedBody)) {
251 $this->decodedBody = [];
254 if ($this->isError()) {
255 $this->makeException();
273 return $this->getGraphNode($subclassName);
289 return $factory->makeGraphNode($subclassName);
303 return $factory->makeGraphAlbum();
317 return $factory->makeGraphPage();
331 return $factory->makeGraphSessionInfo();
345 return $factory->makeGraphUser();
359 return $factory->makeGraphEvent();
373 return $factory->makeGraphGroup();
389 public function getGraphList($subclassName =
null, $auto_prefix =
true)
391 return $this->getGraphEdge($subclassName, $auto_prefix);
404 public function getGraphEdge($subclassName =
null, $auto_prefix =
true)
408 return $factory->makeGraphEdge($subclassName, $auto_prefix);