Answer the question
In order to leave comments, you need to log in
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();
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question