Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-Twitter-Lite CPAN distribution.

Report information
The Basics
Id: 86384
Status: resolved
Priority: 0/
Queue: Net-Twitter-Lite

People
Owner: Nobody in particular
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.12004
Fixed in: (no value)



Subject: 400 Bad Request
I don't know if this is me, twitter changing their API or the module, but very recently this code has stopped working, saying 400: bad request. Any ideas? #!/usr/bin/perl -w use Net::Twitter::Lite::WithAPIv1_1; my $known_user = 0; eval { if(Net::Twitter::Lite::WithAPIv1_1->new(legacy_lists_api => 0)->lookup_users({ screen_name => 'nigelhorne' })) { $known_user = 1; } }; if($@) { die "$@\n"; } print "$known_user\n";
On Mon Jun 24 10:04:00 2013, NHORNE wrote: Show quoted text
> I don't know if this is me, twitter changing their API or the module, > but very recently this code has stopped working, saying 400: bad > request. Any ideas? > > #!/usr/bin/perl -w > > use Net::Twitter::Lite::WithAPIv1_1; > > my $known_user = 0; > > eval { > if(Net::Twitter::Lite::WithAPIv1_1->new(legacy_lists_api => > 0)->lookup_users({ screen_name => 'nigelhorne' })) { > $known_user = 1; > } > }; > if($@) { > die "$@\n"; > } > > print "$known_user\n";
Twitter API v1.1 requires authentication for all calls. You need pass the consumer_key, consumer_secret, access_token, and access_token_secret option to Net::Twitter::Lite::WithAPIv1_1->new.