Open noxzemart opened 3 years ago
This code not supported for a long time. Seems instagram changed something in API.
But to be able to login, you could comment line that fails.
File mgp25\instagram-php\src\Instagram.php line 958: //$this->internal->logAttribution();
/**
* Sends pre-login flow. This is required to emulate real device behavior.
*
* @throws \InstagramAPI\Exception\InstagramException
*/
protected function _sendPreLoginFlow()
{
// Reset zero rating rewrite rules.
$this->client->zeroRating()->reset();
// Calling this non-token API will put a csrftoken in our cookie
// jar. We must do this before any functions that require a token.
$this->internal->fetchZeroRatingToken();
$this->internal->bootstrapMsisdnHeader();
$this->internal->readMsisdnHeader('default');
$this->internal->syncDeviceFeatures(true);
$launcherResponse = $this->internal->sendLauncherSync(true)->getHttpResponse();
$this->settings->set('public_key', $launcherResponse->getHeaderLine('ig-set-password-encryption-pub-key'));
$this->settings->set('public_key_id', $launcherResponse->getHeaderLine('ig-set-password-encryption-key-id'));
$this->internal->bootstrapMsisdnHeader();
//$this->internal->logAttribution();
$this->account->getPrefillCandidates();
$this->internal->readMsisdnHeader('default', true);
$this->account->setContactPointPrefill('prefill');
$this->internal->sendLauncherSync(true, true, true);
$this->internal->syncDeviceFeatures(true, true);
}
Hello
I have problem with login. when I try to login
I alway get this error.
{"message":"error logging attribution","status":"fail"} Something went wrong: InstagramAPI\Response\GenericResponse: Error logging attribution.