pgrimaud / instagram-user-feed

This is a scrapper to easily fetch any feed and interact with Instagram (like, follow, etc.) without OAuth for PHP.
MIT License
880 stars 137 forks source link

Getting errors calling getFeed() #55

Closed scebbers closed 4 years ago

scebbers commented 4 years ago

Initializing the Api runs without errors, but when calling getFeed() on the api object I get the following warnings, and the feed seems empty.

$cache = new Instagram\Storage\CacheManager('instacache');
$api = new Instagram\Api($cache);
$api->setUserName('garagezuidbroek');
$feed = $api->getFeed();

The list of notices is long, but the first three are:

Notice: Undefined property: stdClass::$ProfilePage in /customers/2/5/3/***.***/httpd.www/m/includes/vendor/pgrimaud/instagram-user-feed/src/Instagram/Transport/HtmlTransportFeed.php on line 60

Notice: Trying to get property 'graphql' of non-object in /customers/2/5/3/***.***/httpd.www/m/includes/vendor/pgrimaud/instagram-user-feed/src/Instagram/Transport/HtmlTransportFeed.php on line 60

Notice: Trying to get property 'user' of non-object in /customers/2/5/3/***.***/httpd.www/m/includes/vendor/pgrimaud/instagram-user-feed/src/Instagram/Transport/HtmlTransportFeed.php on line 60

This is when deploying to shared hosting (one.com), on my own server this exact same code works fine.

pgrimaud commented 4 years ago

Hello,

If you are on shared hosting, could you try with login like this example : https://github.com/pgrimaud/instagram-user-feed/blob/master/examples/getMediasWithLogin.php ?

scebbers commented 4 years ago

Using version 5.6-beta I receive the following response in GuzzleHttp:

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://www.instagram.com/accounts/login/ajax/` resulted in a `400 Bad Request` response:
{"message": "checkpoint_required", "checkpoint_url": "/challenge/34250056/E8dV4LU6KT/", "lock": false, "status": "fail"}
 in /customers/2/5/3/***.***/httpd.www/m/includes/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

Instagrams detects an unusual login and requires extra authentification. Any way around this?

martinsnajdr commented 4 years ago

I have the same problem since I think yesterday. Suddenly getFeed stopped working on our server, but still working on my localhost.

scebbers commented 4 years ago

I now basically have the same problem as in issue #48. Instagram does not let my remote server login without email verification, and I cannot find a way around it. It also blocked the IP of my server. I have turned to version 4.0 for now to retrieve media until a solution is found.

maksimpalii commented 4 years ago

Undefined property: stdClass::$ProfilePage http://prntscr.com/qy5bnr

Friend686 commented 4 years ago

"Undefined property: stdClass::$ProfilePage" - same problem.

pgrimaud commented 4 years ago

Hello, I released a new version (6.0). Could you upgrade to this one?