Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Authenticating Facebook - Perl

by DaveLord (Initiate)
on Aug 27, 2011 at 21:52 UTC ( [id://922843]=perlquestion: print w/replies, xml ) Need Help??

DaveLord has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm trying to play with facebook using a perl script. I managed to login to facebook, and now I'm trying to search in facebook. I'm using LWP::UserAgent so I used a get-method

my $response=$browser-> get('http://www.facebook.com/search.php?q=blabla',@header);
and it works, but I want to give a variable as a keyword like
$keyword=blabla; search.php?q=$keyword;
but the script searchs for the word "$keyword" as a searching keyword is there a way to implement a variable in the get-method?

Replies are listed 'Best First'.
Re: Authenticating Facebook - Perl
by dreadpiratepeter (Priest) on Aug 27, 2011 at 22:27 UTC
    You didn't show your code (bad monk!), but extrapolating from the results and your first example, my guess is that you have the argument to get in single quoted strings, so the $keyword variable is not getting interpolated.


    -pete
    "Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."
Re: Authenticating Facebook - Perl
by Anonymous Monk on Aug 28, 2011 at 11:35 UTC
    Life is short so use WWW::Mechanize instead.

Log In?
Username:
Password:

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

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

    No recent polls found