K
Kyri
Hi Everyone,
I'm writing a program that fills in the username and password field on
www.facebook.com/login.php and hits 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:ialogBox;
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='(e-mail address removed)';
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;
I'm writing a program that fills in the username and password field on
www.facebook.com/login.php and hits 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:ialogBox;
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='(e-mail address removed)';
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;