Пример #1
0
 /**
  * Gets data from a given URI of the Facebook Graph API
  * @param string $uri URI to query
  * @param array $params An option array of parameters to pass
  * @return stdClass
  */
 public function getFromGraph($uri, array $params = null)
 {
     $uri = self::FACEBOOK_GRAPH_URI . $uri;
     if (!is_array($params)) {
         $params = array('access_token' => $this->auth->getToken());
     } else {
         array_merge($params, array('access_token' => $this->auth->getToken()));
     }
     $this->http->setUri($uri);
     $this->http->setParameterGet($params);
     return $this->parseFromGraph($this->http->send()->getBody());
 }
Пример #2
0
 /**
  * Gets data from a given URI of the Facebook Graph API
  * @param string $uri URI to query
  * @return stdClass
  */
 protected function getFromGraph($uri)
 {
     $this->http->setUri($uri);
     $this->http->setParameterGet(array('access_token' => $this->auth->getToken()));
     return $this->parseFromGraph($this->http->send()->getBody());
 }