instagram-user-feed icon indicating copy to clipboard operation
instagram-user-feed copied to clipboard

Syntax error in must of methods

Open hossein-rp opened this issue 2 years ago • 13 comments

hi i have this problem can any body knows how to solve it?

show me this error in must of methods .

thank you.

PHP Fatal error: Uncaught Instagram\Exception\InstagramFetchException: Syntax error in C:\xampp2\htdocs\instagram\instagram-user-feed\vendor\pgrimaud\instagram-user-feed\src\Instagram\Transport\AbstractDataFeed.php:61 Stack trace: #0 C:\xampp2\htdocs\instagram\instagram-user-feed\vendor\pgrimaud\instagram-user-feed\src\Instagram\Transport\JsonMediaDetailedDataFeed.php(21): Instagram\Transport\AbstractDataFeed->fetchJsonDataFeed('https://www.ins...') #1 C:\xampp2\htdocs\instagram\instagram-user-feed\vendor\pgrimaud\instagram-user-feed\src\Instagram\Api.php(361): Instagram\Transport\JsonMediaDetailedDataFeed->fetchData(Object(Instagram\Model\Media)) #2 C:\xampp2\htdocs\instagram\instagram-user-feed\examples\media-detailed.php(24): Instagram\Api->getMediaDetailed(Object(Instagram\Model\Media)) #3 {main} thrown in C:\xampp2\htdocs\instagram\instagram-user-feed\vendor\pgrimaud\instagram-user-feed\src\Instagram\Transport\AbstractDataFeed.php on line 61

Fatal error: Uncaught Instagram\Exception\InstagramFetchException: Syntax error in C:\xampp2\htdocs\instagram\instagram-user-feed\vendor\pgrimaud\instagram-user-feed\src\Instagram\Transport\AbstractDataFeed.php:61 Stack trace: #0 C:\xampp2\htdocs\instagram\instagram-user-feed\vendor\pgrimaud\instagram-user-feed\src\Instagram\Transport\JsonMediaDetailedDataFeed.php(21): Instagram\Transport\AbstractDataFeed->fetchJsonDataFeed('https://www.ins...') #1 C:\xampp2\htdocs\instagram\instagram-user-feed\vendor\pgrimaud\instagram-user-feed\src\Instagram\Api.php(361): Instagram\Transport\JsonMediaDetailedDataFeed->fetchData(Object(Instagram\Model\Media)) #2 C:\xampp2\htdocs\instagram\instagram-user-feed\examples\media-detailed.php(24): Instagram\Api->getMediaDetailed(Object(Instagram\Model\Media)) #3 {main} thrown in C:\xampp2\htdocs\instagram\instagram-user-feed\vendor\pgrimaud\instagram-user-feed\src\Instagram\Transport\AbstractDataFeed.php on line 61

hossein-rp avatar Jun 24 '22 16:06 hossein-rp

I'm having the same problem, any results?

WallisonBreno avatar Jul 12 '22 17:07 WallisonBreno

Same Here ....

wailashraf71 avatar Jul 22 '22 00:07 wailashraf71

same here

brucekasinsky avatar Jul 28 '22 02:07 brucekasinsky

same here

nestl1ng avatar Jul 29 '22 15:07 nestl1ng

i have found a solution for it but currently i am working on a project after finished it i will tell you how to fix it

hossein-rp avatar Jul 30 '22 09:07 hossein-rp

Same here! The request returns a response with status 200 but with an empty body.

Rubberg avatar Aug 01 '22 14:08 Rubberg

Ive got the same issue since a couple of days ago. Is there a workaround for this because now my production site is down. Thanks!

axelverdruye avatar Aug 02 '22 09:08 axelverdruye

I have experienced this several times just in the last week or two and was able to fix it by deleting the cache folder, which forces it to re-login and then it works. Would be nice for it to auto handle that if possible! just started in the past couple of weeks.

peterjohnhunt avatar Aug 02 '22 20:08 peterjohnhunt

I have experienced this several times just in the last week or two and was able to fix it by deleting the cache folder, which forces it to re-login and then it works. Would be nice for it to auto handle that if possible! just started in the past couple of weeks.

This is a nice idea. Handle the issue and re-log the account automatically. 🔥

pgrimaud avatar Aug 02 '22 20:08 pgrimaud

just a quick update here. our cached logged in session seems to be getting quietly expired almost on the daily. For now i am continuing to delete the cache folder and re-login via the app which works for a day or so.

peterjohnhunt avatar Aug 04 '22 13:08 peterjohnhunt

Still the same pb. Method getProfile() returns code 200 with some html as datas (probably the instagram login page) causing a Syntax error in json_decode().

There are many issues opened for the same error : https://github.com/pgrimaud/instagram-user-feed/issues/335 https://github.com/pgrimaud/instagram-user-feed/issues/318 https://github.com/pgrimaud/instagram-user-feed/issues/291

Rubberg avatar Sep 27 '22 10:09 Rubberg

@peterjohnhunt Thanks for sharing! Just solved my issues with login by deleting the cache.

paulhennell avatar Feb 28 '23 12:02 paulhennell

Worked like charm! thank to everyone here. But still there is a question. If we have to clear the cache every time and re-login a lot of times does instagram ban us?

matinwd avatar Jul 17 '23 09:07 matinwd