I spent the last three hours trying to get a simple Twitter status update using Zend_Service_Twitterand Zend_Oauth_Token_Access. Restlessly, I keep getting the following answer:
object(Zend_Rest_Client_Result)#34 (2) {
["_sxml:protected"]=>
object(SimpleXMLElement)#39 (2) {
["request"]=>
string(33) "/1/account/verify_credentials.xml"
["error"]=>
string(20) "Invalid / used nonce"
}
["_errstr:protected"]=>
NULL
}
Here is the code I tried:
$token = new Zend_Oauth_Token_Access();
$token->setToken('my token');
$token->setTokenSecret('my token secret');
$params = array('accessToken' => $token,
'consumerKey' => 'my key',
'consumerSecret' => 'my secret'
);
$twitter = new Zend_Service_Twitter($params);
$response = $twitter->statusUpdate('simpletest');
What on earth is "nons"? If I ruin the secret of the token / token, the error message in the response will be changed accordingly. However, with the correct credentials, I continue to receive the aforementioned non-return (pun intended). In addition, I tried several alternatives, such as this previous post in SO format .
Any help would be appreciated!
Update:
, , , Twitter, Twitter. @David Caunt , , "" , Twitter , . ! , oAuth API (, , Zend_Service_Twitter ).