Zend Twitter:连接

时间:2011-01-26 15:45:21

标签: zend-framework twitter

我有以下代码:

        $twitter = new Zend_Service_Twitter(array('username' => $this->site->twitter_username, 'accessToken' => $this->site->twitter_password));
        $response = $twitter->account->verifyCredentials();
        print_r($response);
        $twitter->account->endSession();

我的用户名是我在Twitter上的登录用户名,我的$ this-> site-> twitter_password是我的访问令牌(oauth_token)

但我得到了:

Zend_Rest_Client_Result Object ( [_sxml:protected] => SimpleXMLElement Object ( [request] => /account/verify_credentials.xml [error] => Could not authenticate you. ) [_errstr:protected] => ) 

我不确定我哪里出错了,有什么想法吗?

1 个答案:

答案 0 :(得分:-1)

我最近在博客上写了这篇文章,并附上了一些可以帮助您的指示,如果您需要更多指示,请告诉我。

PHP Using Zend framework to display new tweets as KDE notifications