TWTRTweet.tweetID might not be the Tweet ID?



Just saw this comment in the documentation:

Warning: This represents the id_str field, which could differ from the value of the id field.

TWTRTweet doesn’t provide any other way of getting the ID, no Int64 etc. So are we to just use the tweetID String and hope for the best? :worried:


I’ll check with the team, but I actually think that “warning” is misleading since we suggest using id_str in most cases outside of iOS anyway - I think that would more usefully be updated to be a note, rather than a warning.

tl;dr go ahead and use that value!



Ah, that looks like a misleading note that we should definitely clarify. I believe the intention behind the note is to flag that in some languages (most infamously JavaScript) the 64-bit int ID field can be misrepresented so you end up with different values.

The id_str is absolutely the correct ID to refer to the Tweet.