Zendを使用して、最新のツイートを検索し、ブログに表示するモジュールを開発しようとしています。
私はZend_Service_Twitterこのクラスを読んで学びました。このクラスでは、Twitterから最新のツイートを取得する必要があると思います。
以下に示すこのコードを起動すると:
public function indexAction() {
        $token = unserialize('XXXXX');      
        $twitter = new Zend_Service_Twitter(array(
             'username' => 'XXX',
             'accessToken' => $token,
             'consumerKey' => 'XXXX',
             'consumerSecret' => 'XXXX',
             'callbackUrl' => 'http://localhost/zendtest/public/blog'
         ));            
        // verify user's credentials with Twitter
        $response = $twitter->account->verifyCredentials();
        // Get Timeline
        $response = $twitter->status->userTimeline();
        $this->view->twitresponse = $response;
    }
このエラーが発生します:
Fatal error:
 Uncaught exception 'Zend_Service_Twitter_Exception' with message 'Twitter session is unauthorised. You need to initialize Zend_Service_Twitter with an OAuth Access Token or use its OAuth functionality to obtain an Access Token before attempting any API actions that require authorisation' in D:\Server\xampp\htdocs\zendtest\library\Zend\Service\Twitter.php:282
Stack trace: 
 #0 D:\Server\xampp\htdocs\zendtest\library\Zend\Service\Twitter.php(769): Zend_Service_Twitter->_init() 
 #1 [internal function]: Zend_Service_Twitter->accountVerifyCredentials()
 #2 D:\Server\xampp\htdocs\zendtest\library\Zend\Service\Twitter.php(270): call_user_func_array(Array, Array)
 #3 [internal function]: Zend_Service_Twitter->__call('verifyCredentia...', Array) 
 #4 D:\Server\xampp\htdocs\zendtest\application\modules\twitter\controllers\TwitterServiceController.php(27): Zend_Service_Twitter->verifyCredentials() 
 #5 D:\Server\xampp\htdocs\zendtest\library\Zend\Controller\Action.php(516): Twitter_TwitterServiceController->indexAction() 
 #6 D:\S in D:\Server\xampp\htdocs\zendtest\library\Zend\Controller\Plugin\Broker.php on line 336
私はインターネットとここにたくさんの記事を持っていますが、それでも私の問題を解決することはできません。
誰かがこの問題にどのように対処するか知っていますか?
そして、何が共通していZend_Oauth_Consumerますか?