xavandar has asked for the wisdom of the Perl Monks concerning the following question:
i try to post hello world and all time :
C:\a>perl hello.pl Net::Twitter::Lite::WithAPIv1_1=HASH(0x31ec738) 400: Bad Request C:\a> use Net::Twitter::Lite::WithAPIv1_1; use Scalar::Util 'blessed'; # use strict; # When no authentication is required: #my $nt = Net::Twitter->new(legacy => 0); # As of 13-Aug-2010, Twitter requires OAuth for authenticated reques +ts my $nt = Net::Twitter::Lite::WithAPIv1_1->new( traits => [qw/API::RESTv1_1/], consumer_key => "xxxxxxxxxxxxxxxx", consumer_secret => "xxxxxxxxxxxxxxx", oauth_token => "xxxxxxxxx", oauth_token_secret => "xxxxxxxxxxx", ssl =>1, apiurl => 'http://api.twitter.com/1.1' ); print "\n"; print $nt."\n"; eval { my $result = $nt->update('Hello, world! from perl')}; #my $result = $nt->update =>({status =>'Hello, world from perl and n +et:twitter!'}); #print $result."dansleprint\n"; 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"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Net::Twitter::Lite::WithAPIv1_1 bad request
by marto (Cardinal) on Apr 17, 2017 at 09:57 UTC | |
Re: Net::Twitter::Lite::WithAPIv1_1 bad request
by Mr. Muskrat (Canon) on Apr 19, 2017 at 14:12 UTC |
Back to
Seekers of Perl Wisdom