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 up280 characters via REST API only works for full_text and tweet_mode=extended #880
Comments
This comment has been minimized.
This comment has been minimized.
craigthusiast
commented
Nov 15, 2017
•
|
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! |
This comment has been minimized.
This comment has been minimized.
jm3
commented
Jan 17, 2018
|
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)...
|
This comment has been minimized.
This comment has been minimized.
craigthusiast
commented
Jan 18, 2018
|
Good tip, @jm3. Thanks. |
This comment has been minimized.
This comment has been minimized.
cmirnow
commented
Jan 26, 2018
•
|
Hi, I'm asking for advice. if
, I get:
elsif:
, I get:
How to solve this problem? |
This comment has been minimized.
This comment has been minimized.
dtabares
commented
Feb 15, 2018
•
|
Hi! Has anyone made this work for Retweets? I still get RTs truncated while using tweet_mode: "extended". Original and Replies look fine. Thanks. 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] |
This comment has been minimized.
This comment has been minimized.
reaper-1991
commented
Nov 7, 2018
Hi @dtabares, can you please let me know where to do the changes which you have mentioned. Thank you. |
This comment has been minimized.
This comment has been minimized.
dtabares
commented
Nov 7, 2018
|
Hi @reaper-1991 , in the object where you are storing the re-tweet. |
This comment has been minimized.
This comment has been minimized.
luizcarvalho
commented
Dec 27, 2018
|
Hello @dtabares you solve the problem? |
craigthusiast commentedNov 13, 2017
•
edited
With Twitter's recent change to 280 characters, fetching tweets via the Search REST API endpoints only returns 280 characters when fetched via the
tweet_mode=extendedoption. The defaultcompatibilitymode truncates the tweet text at 140 characters.Here's the documentation:
https://developer.twitter.com/en/docs/tweets/tweet-updates
And here's is Andy Piper's confirmation of this:
https://twittercommunity.com/t/280-characters/94200/6
Note: that the
full_textattribute replaces thetextattribute in extended mode.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
full_textmode, it's not possible to parse out those replies and display only the actual text of the tweet. When there are many @replies, my application doesn't display any of the tweet text, which is really annoying to my users.Can you please add support for the
full_textattribute viatweet_mode=extendedso that applications built with this gem can keep pace with Twitter's changes to the API?