Skip to content

Support extended tweets - #247

Merged
yusuke merged 5 commits into
Twitter4J:masterfrom
takke:support_extended_tweets
Dec 24, 2016
Merged

Support extended tweets#247
yusuke merged 5 commits into
Twitter4J:masterfrom
takke:support_extended_tweets

Conversation

@takke

@takke takke commented Sep 18, 2016

Copy link
Copy Markdown
Contributor

To support extended tweets, add configuration of "tweet_mode=extended" and some fixes.


日本語はこちら↓

@samruston

Copy link
Copy Markdown

Any updates on this PR?

params.add(new HttpParameter("include_ext_alt_text", "true"));
}
if (conf.isTweetModeExtended()) {
params.add(new HttpParameter("tweet_mode", "extended"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an enum would be useful here to illustrate the allowed values of tweet_mode ("compat" and "extended")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need you need to change the size of the params variable:

List params = new ArrayList(4);

private boolean includeEntitiesEnabled = true;
private boolean trimUserEnabled = false;
private boolean includeExtAltTextEnabled = true;
private boolean tweetModeExtended = false;

@matthewbogner matthewbogner Sep 20, 2016

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would favor this being a String or Enum value to accommodate any future usage of this tweet_mode parameter by Twitter with new values.

@frangarcia

Copy link
Copy Markdown

It would be nice to have this pull request merged when possible as Twitter has already started to roll out some changes to support more than 140 chars when using other entities like hashtags or urls https://dev.twitter.com/overview/api/upcoming-changes-to-tweets

return getTarget().getText();
}

@Override

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to add the Override annotation

return getTarget().getDisplayTextRangeStart();
}

@Override

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to add the Override annotation

*/
String getText();

int getDisplayTextRangeStart();

@frangarcia frangarcia Sep 21, 2016

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also add the javadoc part for those 2 methods

 (for extended_tweet.entities.media and entities on DMs)
@takke

takke commented Sep 28, 2016

Copy link
Copy Markdown
Contributor Author

MediaEntityをExtendedMediaEntity相当にする修正を行いました。

GIF動画や動画を含む140文字超ツイートをStreamingで取得した場合に、extended_tweet.entities.media に載る動画情報を取得できるようにするためです。

DMのGIF動画や動画についても同様で、#234 は不要になるのでクローズしました。

詳細は Twitter4JのExtendedMediaEntity廃止について - Qiita にまとめてあります。

@YousefED

Copy link
Copy Markdown
Contributor

What's needed before supporting / merging this? I can help if necessary, Twitter already switched to extended tweets, so we'd need this ourselves sooner than later.

@takke takke mentioned this pull request Sep 30, 2016
@paulpach

Copy link
Copy Markdown

What else is needed to merge this? it sucks having to maintain our own builds.

@tjallingt

Copy link
Copy Markdown

Hey, Just checking in on this pull request to mention how important it is to merge this soon as Twitter already heavily relies on extended_tweet's...
Any ETA for when this will be merged?

@mrkumarawanish

mrkumarawanish commented Nov 15, 2016

Copy link
Copy Markdown

When we can expect to have tweet_mode feature in twitter 4j library?

@vickyst

vickyst commented Nov 25, 2016

Copy link
Copy Markdown

Just wanted to add my voice to the requests for this - is there an ETA for this?

@lmserrano

Copy link
Copy Markdown

Also looking forward to have this soon. Any ETA yet? Is there any help needed?

@yusuke
yusuke merged commit d25b340 into Twitter4J:master Dec 24, 2016
@yusuke

yusuke commented Jan 6, 2017 via email

Copy link
Copy Markdown
Collaborator
@paulpach

paulpach commented Jan 6, 2017

Copy link
Copy Markdown

there is no 4.4.5 version in maven central. The latest version is 4.0.6

@frangarcia

Copy link
Copy Markdown

I think @yusuke got confused with the version and he meant 4.0.5 https://mvnrepository.com/artifact/org.twitter4j/twitter4j-core/4.0.5

@frangarcia

frangarcia commented Jan 11, 2017

Copy link
Copy Markdown

@yusuke can you please confirm which version of twitter4j has this pull request merged in? I was just checking 4.0.5 and it does not seem to have this pull request. If 4.0.5 does not have this pull request, is 4.0.6 a final/stable version? 4.0.6 definitely has this pull request merged in.

@MattWilliams89

Copy link
Copy Markdown

Thanks for merging this, working well on 4.0.6 for me

takke pushed a commit to takke/Twitter4J that referenced this pull request Jul 23, 2018
@takke
takke deleted the support_extended_tweets branch October 23, 2018 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet