Today I Learned

hashrocket A Hashrocket project

Twitter Media and Characters

Today while debugging, we realized something surprising about Twitter— attaching media to a tweet counts as characters and reduces the overall amount of characters available.

Try adding any picture to a tweet. You'll see the available characters drop. We experienced a consistent drop of 24, from 140 to 116, although this seems to have varied at different points in Twitter's history.

This can produce subtle failures in an API call; two-dozen (or so) phantom characters are subtracted just by adding an image and may push any tweet over the limit. Turning up our logs helped expose this issue.

See More #workflow TILs