You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JavaScript number type (double-precision) only has about 15 digits of precision. Javascript rounds any extra digits! Since a Tweet ID has 18 digits, the ID is rounded (very, very bad)
Example:
id: 732822797798539264
turns to:
id: 732822797798539300
The REST service should use the id_str field or convert the id to a string:
id: "732822797798539264"
...
So much time was wasted debugging this.
I now hate javascript.
The text was updated successfully, but these errors were encountered:
kev007
changed the title
Convert Tweet ID to String
REST Service - Convert Tweet ID to String
May 18, 2016
This is also why some tweets were missing from the map. The chance that tweets had similar IDs was high since IDs are assigned sequentially. Tweets with similar timestamps have similar IDs, therefore collisions occurred when they were rounded.
JavaScript number type (double-precision) only has about 15 digits of precision. Javascript rounds any extra digits! Since a Tweet ID has 18 digits, the ID is rounded (very, very bad)
Example:
id: 732822797798539264
turns to:
id: 732822797798539300
The REST service should use the id_str field or convert the id to a string:
id: "732822797798539264"
...
So much time was wasted debugging this.
I now hate javascript.
The text was updated successfully, but these errors were encountered: