How to frequently post tweets on behalf of our customer



Hello every one,

I want to post frequently tweets on behalf of my website customers. I have already oauth_token and oauth_token_secret for users.
My code:

$connection->post(‘statuses/update’, array(‘status’ => “tweeting for users”))

Best Regards.


Does that code not work for you? What is the issue you are seeing?

Be aware of our automation rules, and also that each Twitter account is limited to the number of Tweets that can be posted in a day / period of time.



Thanks, I have first user send to authorization for my app dann I have stored oAuth tokens from user in data base. Few days after I want to post a tweet on behalf of user and I get an error 220 Your credentials do not allow access to this resource.

Best Regards



OK, in that case you may want to reauthorise the user and get a new token.


Did you mean that I should again take the user to twitter authorization screen for reauthorize?


Yes, if the token has expired.


What is meant by token is expired. Are you talking about the token of user which are saved in database ?


when I authorize the user and save the oAuth_token and oAuth_token_secret in database than how can I test whether the Token is expired?


@andypiper Please reply.

How to avoid authorization every time posting a tweet

Well, the tokens should not expire unless the user revokes them in their account settings. If there’s a problem with Tweeting you may need to prompt the user to reauthenticate with your service in some way.


My application get access for all the levels provided by Twitter eg read , write and post. I save both oAuth token and secret. Now when I want to post a tweet after 2 days it throws an error 220.

I am in testing phase and i have another twitter account for testing so I am sure the revoke didn’t take place.

Please advise.

Best Regards


Good Morning @andypiper

Is there any update for me ?

Best Regards


In that case it could be that our antispam systems are restricting your use of the API. What are the formats of your Tweets? Are you following the automation rules?


For Testing I am using a “test 2016-08-08 10:16:33” and timestamp is updated on every tweet. But in future we are sending some tweets about user status on our website.

Best Regards


Good Morning @andypiper

Is there any update for me ?

Best Regards


As mentioned, this could be as a result of the antispam system detecting automated behaviour. Apart from that, I don’t know what else to suggest.