Twitter api text field value is truncated Twitter api text field value is truncated ios ios

Twitter api text field value is truncated


The Twitter API has been changed recently, to support new rules regarding the 280 characters limit.

  1. To get the full text of the tweet, add parameter tweet_mode with value extended to your request parameters.
  2. Field text in the JSON response has been replaced by full_text

More info here: https://dev.twitter.com/overview/api/upcoming-changes-to-tweets


The status in this example is a retweet, and the text for retweets will be truncated to 140 characters even after including tweet_mode=extended. The full text of the original tweet is in the retweeted_status field of the JSON response. Here's what you want:

let text = status["retweeted_status"]["full_text"].

Keep in mind that you should still include tweet_mode=extended in your request.