egg-mode-rs / egg-mode

a twitter api crate for rust
https://crates.io/crates/egg-mode
Mozilla Public License 2.0
372 stars 65 forks source link

Extended tweets #71

Closed jesskfullwood closed 4 years ago

jesskfullwood commented 5 years ago

For search, streams and possibly elsewhere, twitter exposes tweet_mode=extended to request the whole tweet text rather than a truncated version. It would be nice if it was possible to request this extended version - as far as I can tell, at the moment the lib always fetches the truncated version.

QuietMisdreavus commented 5 years ago

All the tweet methods should set this by default already; it looks like the other functions do not.

Is there a use to not loading extended tweets all the time? When extended tweets first came out i had decided to set up as much as i can to always show them. It might be worth it to see whether we can just set it all the time in auth.rs, even for methods that don't return tweets.

VictorKoenders commented 5 years ago

I ran into this and it seems to be an issue with retweeted tweets. The tweet.text will be truncated, but the truncated field is set to false. If you load the tweet by going to http://twitter.com/{tweet.user.unwrap().screen_name}/status/{tweet.id}, you'll also see a truncated tweet.

If you load the original tweet by doing let inner_tweet = tweet.retweet_status.unwrap(), you'll get the full text. That seems to also link to a different tweet on twitter. I'm guessing twitter makes a copy of the original tweet, and truncates that.