Randomly getting 'Status is over 140 characters error'


Our clients seem to be randomly getting this error response back when posting through rest api update_status endpoint.

I tried the same text and it worked the first time, however the second time I posted it I also got the error. This is the original text of the post:
ICYMI: #Sixers story: ‘Nothing official to announce’ regarding Brett Brown’s assistant coaches: https://t.co/T3WeXYZZab #NBA


Hey @dhunniecutt1,

Thanks for reaching out on this. Are you seeing this happen on the same account or on multiple different accounts?


Multiple accounts, I was able to reproduce the error after a couple tries on my own account. - Thx!


Curious how you’re able to reproduce - since you can’t post the same status twice or it will throw you a 187 Status is a duplicate error - Am I misunderstanding anything?

FWIW twitter-text (our parsing library) calculates your Tweet as 124 characters and good to post. You’re not attaching a picture or anything as well?


I posted a different status update between the two tries to reproduce and avoid the duplicate status error. We’re not adding any additional attachments, just the text with the link and hash tag.


Got it - thanks for clarifying. I’ll keep seeing whether I can reproduce, in that case. Certainly seems odd, but on the other hand it also seems like an edge case as identical Tweets are generally not that common on one account - if this is happening on first post though it could be an account issue of some kind. I’ll keep taking a look.


Awesome, thank you. I agree it probably is an edge case. I wasn’t able to find any discernible pattern when testing.


Is there a php version of this parsing library?


Not one that is owned by Twitter as such, but there is a third-party twitter-text in PHP https://github.com/mzsanford/twitter-text-php