Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
280 characters via REST API only works for full_text and tweet_mode=extended #880
With Twitter's recent change to 280 characters, fetching tweets via the Search REST API endpoints only returns 280 characters when fetched via the
Here's the documentation:
Note: that the
I have many features in my application that fetch tweets via the Search API and now that people are tweeting with 280 characters, a large number of them are being truncated.
Also, with the way Twitter no longer counts @replies in the character limit, people are often replying to many people in their tweets. But since the gem doesn't support
Can you please add support for the
Update: after doing some testing and experimenting, it appears that the gem is in fact pulling down the right data when fetching tweets from the Twitter Search API in
After fetching a tweet via
This means that we can properly render 280 character tweets.
It also means that we can at least access all the "components" of a tweet. But it's still a lot of work to parse the full_text of each tweet and somehow remove the user_mentions from the text and display them in a "Replying to:" div, similar to the way Twitter does it in their apps.
It would be super awesome if the gem did that for us!
FYI, you can easily fetch full 280 character statuses with the gem today by passing extended mode via the opts hash:
long_tweet = TwitterClient.status(953020927792631809, tweet_mode: 'extended') fields = long_tweet.to_hash.slice(:full_text, :truncated)
Hi, I'm asking for advice.
, I get:
, I get:
How to solve this problem?
Hi! Has anyone made this work for Retweets? I still get RTs truncated while using tweet_mode: "extended". Original and Replies look fine.
Nevermind, I found that the solution was to get the full_text from raw_tweet.attrs[:retweeted_status][:full_text] instead of raw_tweet.attrs[:full_text]
Hi @dtabares, can you please let me know where to do the changes which you have mentioned.