function showPage() { // Only serve page content if we aren't POSTing via ajax // otherwise, we serve XML content from doPost() if (!$this->isPost() || !$this->boolean('ajax')) { parent::showPage(); } }
public function showPage() { // $this->oauth_token is only populated once Twitter authorizes our // request token. If it's empty we're at the beginning of the auth // process if (empty($this->error)) { if (empty($this->oauth_token)) { // authorizeRequestToken either throws an exception or redirects $this->authorizeRequestToken(); } else { $this->saveAccessToken(); } } parent::showPage(); }