I'm trying load facebook content with CURL, but the system is showing the login page instead of my timeline (also, I'm already signed in). Is something related to cookies? What I'm doing wrong? There's no errors in this code...
$ch = curl_init('https://www.facebook.com');
curl_setopt($ch, CURLOPT_POST, true );
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );
$header = array();
$header[] = "Accept-Language: pt-br,pt;q=0.5";
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7");
curl_setopt($ch, CURLOPT_HEADER, false );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt($ch, CURLOPT_VERBOSE,true);
$data = curl_exec( $ch );
echo $data;
I hope you help me! Thank you