Jump to content

Facebook Auto Login


jaqp95@gmail.com

Recommended Posts

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 :D 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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.