2017-12-21 9 views
2

私は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」。

答えて

0

上記のエラーは、私に固有のアカウントのようです。 Instagramアカウントで悪意のあるアクティビティを検出すると、アカウントをロックし、アクセストークンを取り消し、再度ログインしてアカウントのロックを解除する必要があります。セキュリティチェックポイントと呼ばれます。あなたのようなものは、VPNなどで他の国のアカウントにアクセスしようとしていました。または複数の間違ったパスワードが試行されました。

関連する問題