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
877 stars 136 forks source link

gives issue syntex error #335

Open kashif-sol opened 2 years ago

kashif-sol commented 2 years ago

Version(s) affected: 16

image

kashif-sol commented 2 years ago

anyone here using package and face these issues

fnuppy commented 2 years ago

Hello, I have the same

schelmo commented 2 years ago

i stumbeld upon this also, while trying to get a user profile

$api->getProfile($username);

the error is thrown in https://github.com/pgrimaud/instagram-user-feed/blob/8ae164be0c2849befa2d3e6d14317bf54652e7f0/src/Instagram/Transport/JsonProfileDataFeedV2.php#L28 the Problem is in https://github.com/pgrimaud/instagram-user-feed/blob/8ae164be0c2849befa2d3e6d14317bf54652e7f0/src/Instagram/Transport/AbstractDataFeed.php#L56-L64 instagram is giving an html file back so the json couldnt be decoded ( Syntax Error )

but i couldn't determine what the real problem is. i couldnt find an error in the html response

on my local application (different ip) i dont have the problem

// EDIT: copying the cache file of my local application to the online application solved it for me (temporary)

fnuppy commented 2 years ago

Possible pb with permissions on server and files can not be generated?

schelmo commented 2 years ago

Possible pb with permissions on server and files can not be generated?

nope, its a problem with instagram, since its giving a html file back instead of a json. seems my local cache file has the proper cookies set

kashif-sol commented 2 years ago

i think problem is Instagram ask for login

Rubberg commented 2 years ago

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/318 https://github.com/pgrimaud/instagram-user-feed/issues/291 https://github.com/pgrimaud/instagram-user-feed/issues/298

IrfanPatelDev commented 1 year ago

I am facing the same issue, Please someone help with this issue