thephpleague / oauth1-client

OAuth 1 Client
MIT License
968 stars 73 forks source link

Use id_str instead of id for Twitter IDs #41

Closed adamwathan closed 8 years ago

adamwathan commented 8 years ago

Noticed the id field was being used for a user's Twitter ID. Twitter highly recommends using the id_str field instead due to issues with how large integers are handled in a lot of systems. It's probably not actually an issue in practice in this case, but I've personally run into issues due to this when working with the Twitter API in a Javascript environment, and since it's recommended by their documentation, it seems like it's probably a better choice than using the integer field.

image

https://dev.twitter.com/overview/api/twitter-ids-json-and-snowflake

stevenmaguire commented 8 years ago

@adamwathan nice catch!

bencorlett commented 8 years ago

Nice little spot there Wathan!

adamwathan commented 8 years ago

🙌