public function __construct() { $this->jConfig = EB::jConfig(); $this->app = JFactory::getApplication(); $this->input = EB::request(); $this->config = EB::config(); $this->apiKey = $this->config->get('integrations_facebook_api_key'); $this->apiSecret = $this->config->get('integrations_facebook_secret_key'); // Default redirection url $this->redirect = rtrim(JURI::root(), '/') . '/administrator/index.php?option=com_easyblog&task=facebook.grant'; // Determines if there's a "system" in the url $system = $this->input->get('system', false, 'bool'); if ($system) { $this->redirect .= '&system=1'; } // Determines if there's a "userId" in the url $userId = $this->input->get('userId', null, 'default'); if ($userId) { $this->redirect .= '&userId=' . $userId; } parent::__construct(array('appId' => $this->apiKey, 'secret' => $this->apiSecret)); }
public function __construct($key, $secret, $callback) { $this->callback = $callback; parent::__construct(array('appId' => $key, 'secret' => $secret, 'cookie' => true)); }