Control: tag -1 + unreproducible On Fri, 24 Nov 2017 13:04:49 +0100, Florian Schlichting wrote:
> > Some time ago, Twitter has extended tweets to more than 140 characters. > > But with Net::Twitter, tweets are truncated to 140 characters, and > > even less (because they include a link to get the full tweet when this > > occurs). This makes this module rather useless nowadays. > > > > This module should be updated to the current Twitter API. > > in https://github.com/semifor/Net-Twitter/issues/76 the upstream author > makes clear that he considers Net::Twitter a dead end and has deprecated > it in favour of Twitter::API. In fact, the git repo has added the > following notice: > > This module has been superseded by L<Twitter::API>. Please update as > soon as you possibly can to use new features and the new API > versions. This module will no longer be supported. True but we might still fix the 140 character issue. Except that I see no mention of "140" in the code (only in the POD)?! The update method seems to just POST to statuses/update, and that's it. So let's try ... *a bit later* With the result of the attached script I got (no error, exit status 0, and): https://twitter.com/gregoa_/status/934184021684301824 (length 188 characters) So I can't reproduce a 140 character limit in Net::Twitter. Cheers, gregor -- .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 `. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe `- NP: Led Zeppelin: Dazed And Confused
#/usr/bin/perl
use strict;
use warnings;
use Net::Twitter;
use Scalar::Util 'blessed';
my $nt = Net::Twitter->new(
traits => [qw/API::RESTv1_1/],
consumer_key => ...,
consumer_secret => ...,
access_token => ...,
access_token_secret => ...,
);
my $tweet
= 'Test for https://bugs.debian.org/882390 - what does Net::Twitter do with long messages? '
. '0123456789' x 10;
my $result = $nt->update($tweet);
if ( my $err = $@ ) {
die $@ unless blessed $err && $err->isa('Net::Twitter::Error');
warn "HTTP Response Code: ", $err->code, "\n",
"HTTP Message......: ", $err->message, "\n",
"Twitter error.....: ", $err->error, "\n";
}
signature.asc
Description: Digital Signature

