Maximum length of User ID

3,219 views
Skip to first unread message

山田

unread,
May 11, 2011, 2:19:28 AM5/11/11
to Twitter Development Talk
Hi guys,
I'm trying to store UserID, UserName, StatusID, TextComment, etc to
DB.
I found the max length that UserName was 15 chars, and StatusID was 20
figures, and TextComment was 140 char of course.
But not sure about UserID.
Does anyone have idea?

Thank you.
Yama

Arnaud Meunier

unread,
May 11, 2011, 12:01:25 PM5/11/11
to twitter-deve...@googlegroups.com
Hey Yama,

- screen_name: I would go for 20 Chars, as it has been the limit for some time, before we switched to 15 Chars. Some accounts might still have a screen_name > 15 Chars.
- User ID: I would take the safest option and treat them as Status ID (20 Chars or 64 bits INT). So if we decided in the future to generate User IDs with SnowFlake, you'd be prepared.

Hope that helps!
Arnaud / @rno




--
Twitter developer documentation and resources: https://dev.twitter.com/doc
API updates via Twitter: https://twitter.com/twitterapi
Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list
Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk

yama

unread,
May 12, 2011, 7:09:06 AM5/12/11
to Twitter Development Talk
Arnaud ,

That was really helpful.
I will have 20 char for screen_name and UserID too.

Thanks,
Yama


On 5月12日, 午前1:01, Arnaud Meunier <arn...@twitter.com> wrote:
> Hey Yama,
>
> - screen_name: I would go for 20 Chars, as it has been the limit for some
> time, before we switched to 15 Chars. Some accounts might still have a
> screen_name > 15 Chars.
> - User ID: I would take the safest option and treat them as Status ID (20
> Chars or 64 bits INT). So if we decided in the future to generate User IDs
> with SnowFlake, you'd be prepared.
>
> Hope that helps!
> Arnaud / @rno <http://twitter.com/rno>
Reply all
Reply to author
Forward
0 new messages