Issues

ZF2-174: Zend\Service\Twitter throws an Exception

Issue Type: Bug Created: 2012-02-24T08:39:49.000+0000 Last Updated: 2012-02-29T19:49:56.000+0000 Status: Resolved Fix version(s): Reporter: Sascha Nordquist (schwede) Assignee: Maks 3w (maks3w) Tags: Related issues: Attachments:

Description

Fatal error: Uncaught exception 'Zend\Service\Twitter\Exception\DomainException' with message 'Invalid method type "_uri"' in /var/www/app/zf2/library/Zend/Service/Twitter/Twitter.php:221 Stack trace:

0 /var/www/app/zf2/library/Zend/Service/Twitter/Twitter.php(964): Zend\Service\Twitter\Twitter->__get('_uri')

1 /var/www/app/zf2/library/Zend/Service/Twitter/Twitter.php(1014): Zend\Service\Twitter\Twitter->_prepare('/1/statuses/upd...')

2 /var/www/app/zf2/library/Zend/Service/Twitter/Twitter.php(466): Zend\Service\Twitter\Twitter->_post('/1/statuses/upd...', Array)

3 [internal function]: Zend\Service\Twitter\Twitter->statusUpdate('Hallo Twitter!')

4 /var/www/app/zf2/library/Zend/Service/Twitter/Twitter.php(258): call_user_func_array(Array, Array)

5 [internal function]: Zend\Service\Twitter\Twitter->__call('update', Array)

6 /var/www/app/tools/tweet.php(24): Zend\Service\Twitter\Twitter-> in /var/www/app/zf2/library/Zend/Service/Twitter/Twitter.php on line 221

CODE:

use Zend\Service\Twitter\Twitter;

$text = "Hallo Twitter!";

$token = new \Zend\OAuth\Token\Access; $token->setParams(array( 'oauth_token' => '...', 'oauth_token_secret' => '...' ));

$twitter = new Twitter(array( 'consumerKey' => '...', 'consumerSecret' => '...', 'accessToken' => $token ));

$response = $twitter->status->update($text);

Comments

Posted by Maks 3w (maks3w) on 2012-02-28T17:32:30.000+0000

Could you test this fix #854?

Posted by Maks 3w (maks3w) on 2012-02-29T19:49:56.000+0000

Pull request merged in master branch.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts