New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot retrieve text #813

Open
GeorgeDewar opened this Issue Oct 20, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@GeorgeDewar

GeorgeDewar commented Oct 20, 2016

Using this gem, when I use tweet_mode: "extended", it doesn't seem to correctly handle the tweet text. Without tweet_mode: "extended", the output is as expected:

TwitterClient.status(788590358515032066).full_text
=> "RT @nznavy: OPEN SHIP || Anzac frigate HMNZS Te Mana is in Wellington this weekend & will be open to the public on Saturday, 12… https://t.co/cZpsSACj3l"

JSON.parse(TwitterClient.status(788590358515032066).to_json)["text"]
=> "RT @nznavy: OPEN SHIP || Anzac frigate HMNZS Te Mana is in Wellington this weekend & will be open to the public on Saturday, 12:30-4:30pm #…"

However, with it enabled I get the following:

TwitterClient.status(788590358515032066, tweet_mode: "extended").full_text
=> nil

JSON.parse(TwitterClient.status(788590358515032066, tweet_mode: "extended").to_json)["text"]
=> nil

JSON.parse(TwitterClient.status(788590358515032066, tweet_mode: "extended").to_json)["full_text"]
=> "RT @nznavy: OPEN SHIP || Anzac frigate HMNZS Te Mana is in Wellington this weekend & will be open to the public on Saturday, 12:30-4:30pm #…"

It appears that tweet_mode: "extended" causes a full_text field to be provided instead of text, which breaks things.

@rusikf

This comment has been minimized.

rusikf commented Dec 5, 2016

👍 @GeorgeDewar but you can get text without working with JSON with extended mode:

tweet.attrs[:full_text]

vishnuchilamakuru pushed a commit to vishnuchilamakuru/twitter that referenced this issue Feb 13, 2017

@dekaikiwi

This comment has been minimized.

dekaikiwi commented Mar 23, 2017

We're getting this issue too! Would be great to get #833 merged and released!

dekaikiwi added a commit to Shuttlerock/twitter that referenced this issue Mar 23, 2017

dekaikiwi added a commit to Shuttlerock/twitter that referenced this issue Mar 23, 2017

dekaikiwi added a commit to Shuttlerock/twitter that referenced this issue Mar 23, 2017

dekaikiwi added a commit to Shuttlerock/twitter that referenced this issue Mar 23, 2017

avokhmin added a commit to Shuttlerock/twitter that referenced this issue Mar 24, 2017

vishnuchilamakuru added a commit to vishnuchilamakuru/twitter that referenced this issue Mar 31, 2017

Merge pull request #1 from Shuttlerock/extended-mode-tweet-full-text
[sferik#813] Retrieve full tweet when using extended mode for non-retweet
@chriso0710

This comment has been minimized.

chriso0710 commented Sep 14, 2017

tweet.attrs[:full_text]
did not work for me. I am using
tweet.attrs[:extended_tweet][:full_text]

See #848

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment