M
M
Maxim2019-09-09 16:58:35
PHP
Maxim, 2019-09-09 16:58:35

php phantom instagram login error

When using the code to authorize the user (I want to check the authorization - is the data correct and get the user data)

$client = Client::getInstance();
        $client->getEngine()->setPath('../vendor/bin/phantomjs');
 
        $request  = $client->getMessageFactory()->createRequest();
        $response = $client->getMessageFactory()->createResponse();
 
        $data = array(
            'username' => 'username',
            'password' => 'password'
        );
 
        $request->setMethod('POST');
        $request->setUrl('https://www.instagram.com/accounts/login/?source=auth_switcher');
        $request->setRequestData($data); // Set post data
 
        $client->send($request, $response);
 
 
       echo '<br> Status - '.$response->getStatus();

gives the following message
This page cannot be loaded. If your browser has cookies disabled or you are browsing in private mode, try enabling cookies or disable private mode and then try again.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dug Face, 2019-09-09
@DugFace

There are no cookies.
https://github.com/jonnnnyw/php-phantomjs/issues/178

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question