i concur - until we are sending back an error code if your status update was rejected (for being a duplicate or for going over 140 characters), option #1 seems like the most prudent want to go about this.

Twitter has stated that providing a clear indication of when this has
occurred (I don't recall whether it was stated whether it will be an
error code per se or not) is "on the short list", but no ETA on a fix
has been given.

Until this is resolved, you basically have two options for trying to
detect it:

1) Keep track of the highest status ID you've encountered.  When a
status update is submitted, check the status ID in the response. If the
update succeeded, the new ID will be higher than any old ID.  If it
failed, you'll get an older status (with an older, lower ID) instead.

2) Compare the text that you sent with the text you got back.  If
they're different, it failed - or Twitter did automatic URL shortening
or modified the text in some other manner.  If the new status is an
exact duplicate of the previous status, this would also falsely lead you
to believe that it had succeeded when it actually failed; depending on
your application, this may or may not be relevant.

Obviously, I consider method 1 to be the more reliable (although there
are certain race conditions in which it would fail, too), but it does
require you to keep that latest seen ID around and relatively

Raffi Krikorian
Twitter Platform Team
ra...@twitter.com | @raffi

Reply via email to