StanScates / Tweet.js-Mod

Basic wrapper for Seaofclouds / Tweet.js that incorporates functionality with Twitter's v1.1 API
MIT License
234 stars 103 forks source link

Extended tweets / return "truncated":false #63

Closed jay-b closed 6 years ago

jay-b commented 6 years ago

Anyone got any idea how to integrate tweet_mode : extended to allow longer tweets?

https://developer.twitter.com/en/docs/tweets/tweet-updates

jay-b commented 6 years ago

Figured this out:

1) Add tweet_mode : "extended" to the /1.1/statuses/user_timeline.json params.

2) Change text to full_text in the extract_template_data function:

o.tweet_raw_text = o.retweet ? ('RT @'+o.retweeted_screen_name+' '+item.retweeted_status.full_text) : item.full_text;

This will now show the full 280 character tweets.