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('MyEmail@Email.com').'&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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.