Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^5: How do I use curl with perl and Twitter

by Corion (Patriarch)
on Jul 21, 2009 at 07:32 UTC ( [id://781880]=note: print w/replies, xml ) Need Help??


in reply to Re^4: How do I use curl with perl and Twitter
in thread How do I use curl with perl and Twitter

I don't see, neither from the documentation nor from the Net::Twitter code, where you would need to construct an URL, or a format yourself. The ->show_user method seems to take a user ID, it requests the JSON formatted user details and then turns them into a Perl data structure.

If you don't have Net::Twitter installed on your host, you can easily install it, by following Yes, even you can use CPAN

Replies are listed 'Best First'.
Re^6: How do I use curl with perl and Twitter
by northwestdev (Acolyte) on Jul 21, 2009 at 20:15 UTC
    Net::Twitter is installed. I am no longer getting errors, but this piece of code is not producing any output (and the foreach loop is straight out of http://cpansearch.perl.org/src/CTHOM/Net-Twitter-2.06/README
    my $nt = Net::Twitter->new( traits => [qw/API::REST/], username => $usename, password => $pwd ); my $results = $nt->show_user($twitterID); foreach my $user (@{ $results }) { my $id = $user->{id}; my $name = $user->{name}; print STDOUT $id." ".$name."<br>"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://781880]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 07:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found