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
{{ message }}
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.
First, thanks for the awesome twitter integration package, it's been of great value!
I don't why you decided to use the Twitter user ID as a long number rather than store it in a String. I know it takes less space but if you are not going to make math operations with it and the ID comes from a third party service - then it does make sense to me to wrap the ID in a String, not a Long (and even if you want to compare it to other ID values, string might do it as well).
The problem is - the user ID for my handle @veliko_test1 is 701711162086449152 which is a valid long number in Java, but when returned as JSON to the frontend, the value is approximated by the JS JSON parser to a different value.
To reproduce, just open up a JS parser, preferably the browser console and type:
var number = 701711162086449152;
number
If it makes sense, can you please use String objects for the Twitter user ID instead of longs?
Thanks!
P.S. If you think it's more appropriate for me to make a pull request with the fix, I would happily do so.
The text was updated successfully, but these errors were encountered:
…rialization
Twitter provides id and id_str in User Object. Id is of datatype
long and that could get too long for some programming languages
to handle. For such languages, API is modified to return id in
String format using the method getIdStr().
Hey guys,
First, thanks for the awesome twitter integration package, it's been of great value!
I don't why you decided to use the Twitter user ID as a long number rather than store it in a String. I know it takes less space but if you are not going to make math operations with it and the ID comes from a third party service - then it does make sense to me to wrap the ID in a String, not a Long (and even if you want to compare it to other ID values, string might do it as well).
The problem is - the user ID for my handle
@veliko_test1
is 701711162086449152 which is a valid long number in Java, but when returned as JSON to the frontend, the value is approximated by the JS JSON parser to a different value.To reproduce, just open up a JS parser, preferably the browser console and type:
If it makes sense, can you please use String objects for the Twitter user ID instead of longs?
Thanks!
P.S. If you think it's more appropriate for me to make a pull request with the fix, I would happily do so.
The text was updated successfully, but these errors were encountered: