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
882 stars 138 forks source link

GetLocation method throws an exception #260

Closed floor12 closed 2 years ago

floor12 commented 3 years ago

Version(s) affected: 6.12.3

Description
Looks like Instagram changed they api...

I got exception when trying to load location data by id.

PHP Warning 'yii\base\ErrorException' with message 'Attempt to read property "location" on null'

in /app/vendor/pgrimaud/instagram-user-feed/src/Instagram/Transport/LocationData.php:54

Stack trace:

0 /app/vendor/pgrimaud/instagram-user-feed/src/Instagram/Transport/LocationData.php(54): yii\base\ErrorHandler->handleError(2, 'Attempt to read...', '/app/vendor/pgr...', 54)

1 /app/vendor/pgrimaud/instagram-user-feed/src/Instagram/Api.php(575): Instagram\Transport\LocationData->fetchData(196091681061421)

2 /app/components/GeoTagHelper.php(19): Instagram\Api->getLocation(196091681061421)

How to reproduce
Load location data with ID 196091681061421;

$api->getLocation(196091681061421);

Possible Solution
The graphql response section is empty now. The response has a new structure... The LocationData and LocationHydrator classes need to be updated...

honkkki commented 3 years ago

PHP Notice: Undefined property: stdClass::$graphql in /mnt/d/linux/ins/vendor/pgrimaud/instagram-user-feed/src/Instagram/Transport/JsonMediaDetailedDataFeed.php on line 23 PHP Fatal error: Uncaught TypeError: Return value of Instagram\Transport\JsonMediaDetailedDataFeed::fetchData() must be an instance of stdClass, null returned in /mnt/d/linux/ins/vendor/pgrimaud/instagram-user-feed/src/Instagram/Transport/JsonMediaDetailedDataFeed.php:23

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.