Update a Twitter status using Zend_Service_Twitter
Filed under PHP, Zend Framework
$access = new Zend_Oauth_Token_Access();
$access->setToken('TOKEN')
->setTokenSecret('SECRET');
$params = array(
'username' => 'Promo_City',
'accessToken' => $access,
'consumerKey' => 'CONSUMER KEY',
'consumerSecret' => 'CONSUMER SECRET'
);
$twitter = new Zend_Service_Twitter($params);
$result = $twitter->statusUpdate('Hello world!');
You will find all tokens when registering for an API developper key.
The TOKEN/SECRET pair is in the “My Access Token” section while the CONSUMER KEY/SECRET is in the “Application details” of the app (under “OAuth 1.0a Settings”).
Jan16