Updating the character limit (and the twitter-text library)

twitter-text
extended-tweets

#1

Today, we announced that we’re expanding the character limit for Tweets in languages where cramming was an issue. Starting today, you’ll be able to use the standard Twitter API to send these longer updates in those languages, with no code changes required relating to the POST statuses/update endpoint - and, if your code already makes use of the extended Tweet syntax we introduced last year, you should be in good shape.

There’s another important part to all of this. Our teams maintain an Open Source library - twitter-text - which handles the way our internal services and client applications parse Tweets. This has consistently been a very popular library, and we know that many of you rely on it directly, or use its algorithms indirectly, in your own code.

In the coming weeks, we’ll be pushing an update to twitter-text to the @TwitterOSS organization on Github. This will be the second major revision of the library since it was initially released: twitter-text 2.0!

Due to the increase in the flexibility and format of Tweets over time, the new version takes an enhanced approach to parsing what makes up a Tweet body.

  • Introduces Configuration that covers the Unicode code point ranges inside a Tweet, as well as maximum weighted length for validation, default weight to cover code points not defined in the ranges and transformed URL length, which is the default length assigned to all URLs.
  • Uses a new weighted length calculation to determine the validity of the length of a Tweet.
  • Introduces a new, simpler parseTweet() API method that returns all of the relevant information (validity, weighting, display range etc) in a single call.
  • Deprecates - but still supports - the existing methods for Tweet length and character count calculations. These will be removed in a future version of the library.

You can get a head-start in understanding the detail of these changes by consulting the technical documentation we just published on our developer site.

When the new version is released, feel free to ask questions via the Developer Teatime category; or, for technical issues and problems, raise an issue against the project on Github.

Thanks for building on the Twitter Developer Platform - we hope you enjoy the new version of twitter-text!


280 GA release - API soon?
How to manage restrictions concerning CJK languages with the 280 character limit?
Shipped - twitter-text 2.0
Announcement: Twitter Ads 280 support
When will Twitter Ads support 280 characters?
#2

280 characters