Skip to content

Commit

Permalink
test of oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
danwdart committed Mar 27, 2011
1 parent 5ba4a0b commit 2b8fa32
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions application/modules/app/controllers/StatusController.php
Expand Up @@ -11,16 +11,25 @@ class App_StatusController extends ZB_Controller_Action_App
private $_update_url = 'http://twitter.com/statuses/update.json';
private $_callback = 'http://zetabud.dandart.co.uk/app/status/callback';

private $_config = array(
'callbackUrl' => $this->_callback,
'siteUrl' => $this->_site_url,
'consumerKey' => $this->_consumer_key,
'consumerSecret' => $this->_consumer_secret
);
private $_config;


public function preDispatch()
{
$this->_config = array(
'callbackUrl' => $this->_callback,
'siteUrl' => $this->_site_url,
'consumerKey' => $this->_consumer_key,
'consumerSecret' => $this->_consumer_secret
);
}

public function indexAction()
{
if(!is_null($_SESSION['ACCESS_TOKEN'))
$this->requireLogin();
$this->view->assign('apptitle', 'Social Status');

if(isset($_SESSION['ACCESS_TOKEN']))
{
$this->_redirect('/app/status/post');
}
Expand Down Expand Up @@ -74,9 +83,4 @@ public function callbackAction()

}

public function indexAction()
{
$this->requireLogin();
$this->view->assign('apptitle', 'Social Status');
}
}

0 comments on commit 2b8fa32

Please sign in to comment.