Logging in to Facebook using PHP Script and curl
Posted: Wed Apr 15, 2009 7:54 am
Hi everyone,
I want to login into facebook with a valid username and password. My goal is to get the contents of user's home page.
I am using curl for my http requests and I know how to use curl cookies.
My question is: What is the exact http request for logging in to facebook?
I was trying something like
$page = $cu->get("https://login.facebook.com/login.php?em ... s=password");
(curl code from here: http://us3.php.net/manual/en/book.curl.php#86391)
But it does not work.
All I want is to be able to get the html source of a user's (with known username/password) home page in facebook by php code! Any trick that does this is welcome!
I want to login into facebook with a valid username and password. My goal is to get the contents of user's home page.
I am using curl for my http requests and I know how to use curl cookies.
My question is: What is the exact http request for logging in to facebook?
I was trying something like
$page = $cu->get("https://login.facebook.com/login.php?em ... s=password");
(curl code from here: http://us3.php.net/manual/en/book.curl.php#86391)
But it does not work.
All I want is to be able to get the html source of a user's (with known username/password) home page in facebook by php code! Any trick that does this is welcome!