Randomly getting 'Status is over 140 characters error'

api

#1

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


#2

Hey @dhunniecutt1,

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


#3

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


#4

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?


#5

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.


#6

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.


#7

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


#8

Is there a php version of this parsing library?


#9

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