Hasokeyk/instagram

Login fail

Q5Ca opened this issue · 4 comments

Q5Ca commented

I tried to use examples/user/instagram-user-statistics.php but the output is always Login Fail although I did use valid credentials.

Hi,

I didn't get an error when I checked.

Which version are you using?

Can you try again with the latest version?

I have the same problem. Login failed and no error log.

  • Latest version ok
  • PHP 7.4 ok

Using two_factor_identifier

I released a new update. Can you update the library and try again?

Last version : 1.0.24

I have login problems too... This is my code:

$instagram = new instagram($username,$password);
$instagram->login->login();

if($instagram->login->login_control()){
    $image_path = __DIR__.'/special.jpeg';
    $check = $instagram->medias->share_photo($image_path,'Hello every body');
    print_r($check);
}else{
    echo 'Login Fail';
}

The login check is done but the performed request by $instagram->medias->share_photo returns the response below

Array
(
    [status] => fail
    [message] => Client error: `POST https://i.instagram.com/rupload_igphoto/1643222861_0_797211111` resulted in a `403 Forbidden` response:
{"message":"login_required","status":"fail"}

    [headers] => Array
        (
            [Date] => Array
                (
                    [0] => Fri, 04 Feb 2022 04:11:01 GMT
                )

            [X-FB-TRIP-ID] => Array
                (
                    [0] => 1512268381
                )

            [Connection] => Array
                (
                    [0] => keep-alive
                )

            [Content-Length] => Array
                (
                    [0] => 44
                )

        )

    [body] => {"message":"login_required","status":"fail"}
)