/** * Constructor * * @throws Exception */ public function __construct() { /* if (!class_exists('Facebook')) { throw new Exception('Facebook PHP SDK not found'); } */ if (!Configure::read('Facebook')) { throw new Exception('Facebook configuration not loaded'); } // @todo implement other config params $this->config = array('appId' => Configure::read('Facebook.appId'), 'secret' => Configure::read('Facebook.appSecret')); if (self::$version > self::API_VERSION_UNVERSIONED) { $version = 'v' . self::$version; self::$DOMAIN_MAP = array('api' => 'https://api.facebook.com/' . $version . '/', 'api_video' => 'https://api-video.facebook.com/' . $version . '/', 'api_read' => 'https://api-read.facebook.com/' . $version . '/', 'graph' => 'https://graph.facebook.com/' . $version . '/', 'graph_video' => 'https://graph-video.facebook.com/' . $version . '/', 'www' => 'https://www.facebook.com/' . $version . '/', 'www-unversioned' => 'https://www.facebook.com/'); } //$this->FB = new Facebook($this->config); parent::__construct($this->config); }