Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Authenticating Facebook - Perl

by DaveLord (Initiate)
on Aug 27, 2011 at 21:52 UTC ( #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? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2022-06-28 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (91 votes). Check out past polls.

    Notices?