-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support extended tweets #247
Conversation
Any updates on this PR? |
@@ -77,6 +77,9 @@ | |||
if (conf.isIncludeExtAltTextEnabled()) { | |||
params.add(new HttpParameter("include_ext_alt_text", "true")); | |||
} | |||
if (conf.isTweetModeExtended()) { | |||
params.add(new HttpParameter("tweet_mode", "extended")); |
There was a problem hiding this comment.
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")
There was a problem hiding this comment.
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);
@@ -73,6 +73,7 @@ | |||
private boolean includeEntitiesEnabled = true; | |||
private boolean trimUserEnabled = false; | |||
private boolean includeExtAltTextEnabled = true; | |||
private boolean tweetModeExtended = false; |
There was a problem hiding this comment.
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.
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 |
@@ -81,6 +81,15 @@ public String getText() { | |||
return getTarget().getText(); | |||
} | |||
|
|||
@Override |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
@@ -48,6 +48,10 @@ | |||
*/ | |||
String getText(); | |||
|
|||
int getDisplayTextRangeStart(); |
There was a problem hiding this comment.
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)
MediaEntityをExtendedMediaEntity相当にする修正を行いました。 GIF動画や動画を含む140文字超ツイートをStreamingで取得した場合に、 DMのGIF動画や動画についても同様で、#234 は不要になるのでクローズしました。 詳細は Twitter4JのExtendedMediaEntity廃止について - Qiita にまとめてあります。 |
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. |
What else is needed to merge this? it sucks having to maintain our own builds. |
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... |
When we can expect to have tweet_mode feature in twitter 4j library? |
Just wanted to add my voice to the requests for this - is there an ETA for this? |
Also looking forward to have this soon. Any ETA yet? Is there any help needed? |
Hi,
The pull request has been merged. And the latest build is available on the central repository as version 4.4.5.
Best regards,
Yusuke
… On Dec 9, 2016, at 21:43, Luis Miguel Serrano ***@***.***> wrote:
Also looking forward to have this soon. Any ETA yet? Is there any help needed?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
there is no 4.4.5 version in maven central. The latest version is 4.0.6 |
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 |
@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. |
Thanks for merging this, working well on 4.0.6 for me |
Support extended tweets
To support extended tweets, add configuration of "tweet_mode=extended" and some fixes.
日本語はこちら↓