Control: retitle -1 libnet-twitter-perl: please document how to get extended tweets
Control: tags -1 - unreproducible
I'm not talking about the "update" method, but tweets that are read,
e.g. via user_timeline. The limit of 140 characters comes from Twitter,
with the old API. However, after searching a bit, I've found that it
doesn't need any code change. The POD documentation is just misleading
(one has the impression that it gives all the parameters that are
accepted) and incomplete with the current API.
According to
https://developer.twitter.com/en/docs/tweets/tweet-updates
one needs the "Extended" mode for REST APIs.
For user_timeline, the documentation is:
user_timeline
Parameters: user_id, screen_name, since_id, max_id, count,
trim_user, exclude_replies, include_rts, contributor_details
Required: none
[...]
It should add the "tweet_mode" parameter, and say that it can be
set to "extended" for extended mode, and say that the tweet is
available in "full_text" instead of "text".
But since this applies to several methods, this could also be a
new section in the documentation. The initial example could also
be updated, by changing
my $statuses = $nt->friends_timeline({ since_id => $high_water, count => 100 });
for my $status ( @$statuses ) {
print "$status->{created_at} <$status->{user}{screen_name}> $status->{text}\n";
to
my $statuses = $nt->friends_timeline({ since_id => $high_water, count => 100, tweet_mode => 'extended' });
for my $status ( @$statuses ) {
print "$status->{created_at} <$status->{user}{screen_name}> $status->{full_text}\n";
(not tried on this particular example, but this worked in my scripts
for home_timeline and user_timeline).
BTW, the URL's to the API documentation are obsolete, so that this
didn't help at the beginning.