Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Don't have ProfilePage index but i have LoginAndSignupPage

I have a problem that suddenly appeared two days ago. I have a prestashop module that allows me to retrieve images from an Instagram page.

It was working very well but all of a sudden, nothing is working. I have an error that is "ProfilePage: Undefined index" I did a lot of var_dump and I notice that the json no longer has this index, it became LoginAndSignupPage.

What's stranger, with the same module, the same code, it works on the pre-production, locally too but not on the production. At first, I thought the site's host had made some changes but no, they didn't...

https://imgur.com/3utc6bB

Do you have any idea?

Thank you for your help

like image 931
Winda Avatar asked Nov 06 '22 14:11

Winda


1 Answers

The issue is Instagram over the last week or so has restricted their unlogged-in (guest) access (based on IP address).

After a large amount of queries to their servers, they will begin showing a "Please login" page ().

The only way around this would be to have each of your Users on Instagram who wish to use this process create an API Key (This is unrealistic because mainly we do not know them). Otherwise we'll need to use a proxy when issuing the request to Instagram so it doesn't see you hit their servers multiple times from the same IP address.

Using code on on a brand new IP address that hasn't hit Instagram's servers work just fine. However after multiple queries (once the IP is blacklisted) I get the same login page not the instagram account.

According to Instagram's documentation for their API they want you to have a API Key for every User who wishes to pull their photos (keeping the API key in sandbox mode). Again this seems unrealistic to me. We "can" submit our App on Instagram for review (which theoretically "may" let you pull photos for other Users from the same API key), but I highly doubt they'd approve an app that pulls images and metadata off their servers.

like image 152
Semir Hodzic Avatar answered Nov 15 '22 13:11

Semir Hodzic