Schotsl
Schotsl

Reputation: 227

Twit package doesn't return full tweet

When I console log a Tweets text attribute that I got from the stream functionality of the Twit package it returns strings like these: (I've replaced the links with a other URL) ‌‌‌‌

"When corruption, sedition, tyranny and treason like this happened in France and America in the late eighteenth cent… https://randomlink.com"

"@AhmedBaba_ @realDonaldTrump Did ya happen to notice the \" mark's? This would imply that his tweet is in fact someo… https://randomlink.com"

At first appearance it seems fine, but most tweets cut of early and contain a "…" before the URL that it contains, when I look at the tweet object I can't find any attributes that actually contain the full tweet. How would I get it?

Upvotes: 0

Views: 251

Answers (1)

mexo
mexo

Reputation: 342

As described in : Tweet updates Documentation

"text" field is truncated to 140 characters

Included is new "extended_tweet" field in payload, containing:

  • full_text
  • display_text_range
  • entities
  • extended_entities

In order to access it you should specify tweet_mode=extended parameter

Upvotes: 2

Related Questions