protected function _actionGetaccesstoken($context)
    {
        $this->getAPI()->requestAccessToken($this->getRequest());

        $token = (array) $this->getAPI()->getToken();
        $consumer = (array) $this->_consumer;

        AnRequest::set('session.oauth', array(
                            'api' => $this->getAPI()->getName(),
                            'token' => $token,
                            'consumer' => $consumer
                        ));

        $return = AnRequest::get('session.return', 'raw', null);

        if ($return) {
            $context->append(array('data' => array('return' => $return)));
        }
    }
protected function _actionGetaccesstoken($context)
    {
        $this->getAPI()->requestAccessToken($this->getRequest());

        $token = (array) $this->getAPI()->getToken();
        $consumer = (array) $this->_consumer;

        AnRequest::set('session.oauth', array(
                            'api' => $this->getAPI()->getName(),
                            'token' => $token,
                            'consumer' => $consumer
                        ));

        $return = AnRequest::get('session.return', 'raw', null);

        if ($return) {
            $context->append(array('data' => array('return' => $return)));
        }
    }
protected function _actionGetaccesstoken ( $ context ) { $ this -> getAPI ( ) -> requestAccessToken ( $ this -> getRequest ( ) ) ; $ token = ( array ) $ this -> getAPI ( ) -> getToken ( ) ; $ consumer = ( array ) $ this -> _consumer ; AnRequest :: set ( 'session.oauth' , array ( 'api' => $ this -> getAPI ( ) -> getName ( ) , 'token' => $ token , 'consumer' => $ consumer ) ) ; $ return = AnRequest :: get ( 'session.return' , 'raw' , null ) ; if ( $ return ) { $ context -> append ( array ( 'data' => array ( 'return' => $ return ) ) ) ; } }
Handles callback.

@param AnCommandContext $context
Handles callback .