public function __construct() { $this->app = JFactory::getApplication(); $this->input = $this->app->input; $this->config = EB::config(); $this->apiKey = $this->config->get('integrations_twitter_api_key'); $this->apiSecret = $this->config->get('integrations_twitter_secret_key'); // Set the redirection callback for Twitter $this->redirect = rtrim(JURI::root(), '/') . '/administrator/index.php?option=com_easyblog&task=twitter.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($this->apiKey, $this->apiSecret); }
public function __construct($key, $secret, $callback) { parent::__construct($key, $secret); $this->callback = $callback; }