예제 #1
0
파일: Facebook.php 프로젝트: kdyby/facebook
 /**
  * Parses the metadata cookie that our Javascript API set
  *
  * @return array
  */
 protected function getMetadataCookie()
 {
     $cookieName = $this->config->getMetadataCookieName();
     // The cookie value can be wrapped in "-characters so remove them
     if (!($cookieValue = trim($this->httpRequest->getCookie($cookieName), '"'))) {
         return array();
     }
     parse_str($cookieValue, $metadata);
     array_walk($metadata, function (&$value, &$key) {
         $value = urldecode($value);
         $key = urldecode($key);
     });
     return $metadata;
 }
예제 #2
0
 /**
  * @param \Nette\Http\Session $session
  * @param Configuration $config
  */
 public function __construct(Nette\Http\Session $session, Configuration $config)
 {
     $this->session = $session->getSection('Facebook/' . $config->getApplicationAccessToken());
 }