DanielSpaniel has asked for the wisdom of the Perl Monks concerning the following question:
Twitter recently updated their API (June 11th, 2013) and, not surprisingly, my code no longer works.
However, I found that, for Perl at least, it seemed an easy enough problem to solve, because a new/updated Perl module was also released to accommodate the new API.
My little test script is below:#!/usr/bin/perl use strict; use Net::Twitter::Lite::WithAPIv1_1; use Scalar::Util 'blessed'; use Data::Dumper; my $nt=''; my $r=''; eval{ $nt = Net::Twitter::Lite::WithAPIv1_1->new; my $terms='nyc'; # Just a test term $r = $nt->search($terms); }; print Dumper($r); exit;
However, I never seem able to get data back, and the output from Dumper is always: $VAR1 = '', no matter what the search term.
So far as I can see I think I'm doing everything okay (module docs at: http://search.cpan.org/~mmims/Net-Twitter-Lite-0.12004/lib/Net/Twitter/Lite/WithAPIv1_1.pod), and from my perspective there's really not too much difference between using the new module and the old one.
I'm sure that many other people must also have had issues when Twitter updated their API, so I'm hoping maybe somebody can assist.
FYI, for reading tweets from Twitter, no authentication is required.
Any help would be much appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl / New Twitter API
by toolic (Bishop) on Jul 02, 2013 at 18:00 UTC | |
by DanielSpaniel (Scribe) on Jul 02, 2013 at 18:18 UTC | |
by Preceptor (Deacon) on Jul 02, 2013 at 18:41 UTC | |
|
Re: Perl / New Twitter API
by dmck (Initiate) on Aug 26, 2013 at 17:04 UTC |