Closed inb4ohnoes closed 8 years ago
I added support for extended tweets (creation and consumption) in https://github.com/nst/STTwitter/commit/c5443851a3500b4547eb4be15089a6c49fac4587. Can you please ensure that it works as you expect?
Everything seems works as expected on the API part, thank you so much! Can you also update st_numberOfCharactersInATweet
to reflect new counting?
Extended tweets are made of 3 parts:
Even though the total overall displayable text length may exceed 140 characters (part 1 + part 2 + part 3), the "text region" (part 2) remains limited to 140 characters, which can be counted with st_numberOfCharactersInATweet
.
Yeah, I was hoping st_numberOfCharactersInATweet
would be able to handle counting (or not counting) the cases at the beginning and end as well, but if you believe it shouldn't be part of the scope of that method that's ok.
Also, I didn't notice this before, but doesn't Twitter say that the extended tweet mode parameter should apply across all rest endpoints? I noticed you only added that parameter for some methods.
There's also a spelling mistake. You wrote "extented" instead of "extended" for the method definition. I'll create a PR later that fixes these issues.
Doesn't Twitter say that the extended tweet mode parameter should apply across all rest endpoints?
Not all.
"Any endpoints that return Tweets will accept a new tweet_mode request parameter."
https://dev.twitter.com/overview/api/upcoming-changes-to-tweets
There's also a spelling mistake. You wrote "extented" instead of "extended" for the method definition.
Sorry for that thank you for spotting the typo.
Ah sorry, I was looking at the chart they provide which says "any endpoint". In any case, I've created the PR https://github.com/nst/STTwitter/pull/266. I've verified that all the changes I've made work. Please take a gander!
So, could you please update https://github.com/nst/STTwitter/pull/266 so that it does add the "useExtendedTweetMode" parameter only to methods that return Tweets?
Ok, I'll do that now. Should convenience methods have extended tweets turned on by default?
Twitter API default is compatibility mode "to support older clients and display methods". This will change "in the future".
Also, users of STTwitter convenience methods don't expect the response format to suddenly change.
So, I would keep the compatibility mode by default for now.
Ok, I've updated https://github.com/nst/STTwitter/pull/266. Can you check?
merged
Would be awesome if STTwitter supported these new changes! https://dev.twitter.com/overview/api/upcoming-changes-to-tweets