> On Jun 7, 12:47 am, Kyri <kiwi
@gmail.com> wrote:
> > Hi Everyone,
> > I'm writing a program that fills in the username and password field onwww.facebook.com/login.phpandhits submit.
> > The forms fill out correctly and the button is hit correctly.
> > However, I get an error page when my program tries to log in. It has
> > the message:
> > "Cookies are not enabled on your browser. Please adjust this in your
> > security preferences before continuing."
> > Here is that portion of my code:
> > # Author: Kyri Baker
> > # 2007/06/05
> > use Tk;
> > use LWP;
> > use HTTP::Cookies;
> > use POSIX;
> > use strict;
> > require Tk::DialogBox;
> > require LWP::UserAgent;
> > my $ua = LWP::UserAgent->new;
> > $ua->cookie_jar( HTTP::Cookies->new() );
> > $ua->timeout(10);
> > $ua->env_proxy;
> > $ua->agent('Mozilla/5.0');
> > my $email='kiwi@gmail.com';
> > my $pass='MY_PASSWORD';
> > my $action = 'Login';
> > my $response = $ua->post('http://www.facebook.com/login.php',['email'=>
> > $email, 'pass'=>$pass, 'doquicklogin'=>$action]);
> > print $response->content;
> > --------
> > Any input at all would be great, I'm just getting into Perl. :c)
> The cookie jar needs a file, e.g.,
> my $cjar = "/tmp/bmb_lwpcookies.txt"; # yours will be different
> my $ua = LWP::UserAgent->new(cookie_jar=>{file=>$cjar,autosave=>1});
> But I haven't tested your script to see if this is the actual/only
> problem.
> --
> Brad
Ah...thank you. This is a very ignorant question, but I currently