Take the 2-minute tour ×

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();

    $twitter = new Zend_Service_Twitter(array(
      'username'    => $network->twitter->username,
      'accessToken' => $token,


    $tweet = "A test tweet.";

    return $twitter->status->update($tweet);

What am I doing wrong? Thanks!

share|improve this question
what do you get if you Zend_Debug::dump($network->twitter->username) –  RockyFord Jan 21 '12 at 9:38
you do have a different token for each user, correct? I'm reachin' here... –  RockyFord Jan 21 '12 at 12:15
same token for each user. i'm thinking this is indeed the problem, but i'm not sure how to get a different token per user. –  cjroth Jan 25 '12 at 14:40
every time you login a different user using oauth you should get a different token. I surprised that that twitter will update all of these accounts at the same time with only one token. Each user should have unique credentials required to get an oauth token. –  RockyFord Jan 26 '12 at 9:27
actually it's just one user account at the moment. so, it sounds like somewhere in the user's settings i'll find a token particular to that user. actually, here's a dumb question (but it wasn't obvious from the UI) - how do i add my app to the user account? –  cjroth Jan 30 '12 at 15:48

Your Answer



Browse other questions tagged or ask your own question.