[email protected] Posted September 3, 2011 Share Posted September 3, 2011 Hey, I'm trying to autologin to facebook using curl, but nothing will work. The nearest I got was that I logged in in my current window (so I had the normal facebook-homepage on my-server.com/facebooklogin.php), but when I open facebook.com in a new tab I'm not logged in anymore. Does someone know how I can login into facebook with cURL/PHP or maybe something else? function Send_to_Server($url) { $ch = curl_init($url); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, 'email='.urlencode('[email protected]').'&pass='.urlencode('MyPassword').'&login=Login'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER,0); curl_setopt ($ch, CURLOPT_HEADER, 1); curl_setopt ($ch, CURLOPT_NOBODY, 1); $result = curl_exec ($ch); curl_close ($ch); return $result; } $string = Send_to_Server('https://login.facebook.com/login.php?m&next=http%3A%2F%2Fm.facebook.com%2Fhome.php'); echo $string; That doesn't work I don't have any output and I'm not logged in in facebook Greetings Link to comment https://forums.phpfreaks.com/topic/246336-facebook-auto-login/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.