AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Instafeed js git1/4/2024 ![]() ![]() Personally, I wouldn't rely on this for anything critical in production. If IG ever change this (even adding or removing a space), this will stop working without warning. For instance, this script relies on the string window._sharedData = appearing in the page exactly. A scraper must make assumptions about the contents of the page it's scraping. The fact that it's scraping the returned HTML makes it much less reliable. If IG's CORS policy ever changes, everything relying on this will stop working without warning. ![]() The fact that this is undocumented (AFAICT) gives it unknown reliability. Is this intentional? Accidental? Who knows - it's definitely not common though. I tested with an origin of "Blah Blah" and it worked - it doesn't need to even be a domain. The fact that IG appears to be allowing any origin suggests they're deliberately allowing this behaviour. Ordinarily, a request like this would be blocked - javascript on a website can only request from it's own domain (the same-origin policy), or a host which sets that Access-Control-Allow-Origin header to allow the domain. That's an interesting/odd policy for something like IG. surprising! It's basically a web-scraper in Javascript, and works because IG's web endpoints are setting a CORS Access-Control-Allow-Origin header on the response which matches any Origin header you send. Here's the set-up I have for reference (includes liquid language as used on Shopify, so just ignore - That's. not sure if that has anything to do with it? Are there any known security settings that will prevent instafeed from working on a specific account? To note, the account I'm looking to pull in has a very large following. When I plug in my personal Instagram account userId & clientId, everything works perfect so I know it's not an issue with how I have it set up. I have it all setup - but it will not pull in my client's account. I'm working on a client project (built on Shopify platform) and am looking to pull in their Instagram posts by user. Credentials created before the API restrictions went live are not affected for now. UPDATE ( This thread has turned into a conversation about how Instafeed.js is going to work with Instagram's new API restrictions.Ĭurrently, new Instagram API clients are not able to fetch much of the data that Instafeed.js relied on to work, and we are evaluating options for how to handle authentication going forward. ![]()
0 Comments
Read More
Leave a Reply. |