私はthisInstagram
メディア投稿第三者のライブラリを使用しています。チェックポイント(チャレンジ)が必要なエラーが発生するたびに、Instagramアカウントにログインしているときに、この問題をどのように修正できますか?web apiを使用してInstagramにメディア投稿をアップロード
これは、ログインコードです:
try
{
$response = $this->request('accounts/login/')
->setNeedsAuth(false)
->addPost('phone_id', $this->phone_id)
->addPost('_csrftoken', $this->client->getToken())
->addPost('username', $this->username)
->addPost('adid', $this->advertising_id)
->addPost('guid', $this->uuid)
->addPost('device_id', $this->device_id)
->addPost('password', $this->password)
->addPost('login_attempt_count', 0)
->getResponse(new Response\LoginResponse());
}
catch (\InstagramAPI\Exception\InstagramException $e)
{
if ($e->hasResponse() && $e->getResponse()->isTwoFactorRequired())
{
// Login failed because two-factor login is required.
// Return server response to tell user they need 2-factor.
return $e->getResponse();
}
else
{
// Login failed for some other reason... Re-throw error.
throw $e;
}
}
あなたはこのhereに関するより詳細な情報を見つけることができます:
エラー応答:
メッセージ: "checkpoint_required"、 checkpoint_url: "https://i.instagram.com/challenge/6193546568/K2IwuBF47k/"、 ロック:真、 状況:「失敗」、 ERROR_TYPE:あなたはInstagramのメディアポストの他の方法を持っているなら、あなたは私を提案することができ
を「checkpoint_challenge_required」。