开发者

Zend Twitter: Connecting

开发者 https://www.devze.com 2023-02-06 16:46 出处:网络
I have the following code: $twitter = new Zend_Servi开发者_C百科ce_Twitter(array(\'username\' => $this->site->twitter_username, \'accessToken\' => $this->site->twitter_password));

I have the following code:

        $twitter = new Zend_Servi开发者_C百科ce_Twitter(array('username' => $this->site->twitter_username, 'accessToken' => $this->site->twitter_password));
        $response = $twitter->account->verifyCredentials();
        print_r($response);
        $twitter->account->endSession();

My username is my Login Username on twitter, my $this->site->twitter_password is my Access Token (oauth_token)

Yet I get:

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

I'm unsure where I'm going wrong, any ideas?


I recently blogged about this and have included some instructions that should get you going, let me know if you need any more pointers.

PHP Using Zend framework to display new tweets as KDE notifications

0

精彩评论

暂无评论...
验证码 换一张
取 消