I've got a Twitter Application that is hooked up to multiple Twitter accounts. I want to be able to update their statuses individually through the one application so that I can use the same OAuth tokens. My problem is that it is currently updating all of the user's statuses that have registered with the application, as if it is ignoring the "username" key in the array. Here is the code:
$network = Zend_Registry::get('NetworkConfig');
$token = new Zend_Oauth_Token_Access();
$token->setToken($network->twitter->oauthToken)
->setTokenSecret($network->twitter->oauthTokenSecret);
$twitter = new Zend_Service_Twitter(array(
'username' => $network->twitter->username,
'accessToken' => $token,
));
$twitter->setLocalHttpClient($token->getHttpClient(array()))
->account->verifyCredentials();
$tweet = "A test tweet.";
return $twitter->status->update($tweet);
What am I doing wrong? Thanks!