InstagramFeed
InstagramFeed copied to clipboard
CORS policy workaround is inconsistent
The solution posted here works sometimes but is not consistent. I still get blocked by CORS errors sometimes, then I have to wait a while. Any advice to get this to work consistently? Or is it a request limit issue? I'm storing the retrieved posts in cookie so that I'm not making the request on every page load. But if new site visitors are going to get the CORS issue then this won't work out. Here's my options object:
{
'username': '<username>',
'container': feedEntry,
'display_profile': false,
'display_biography': false,
'display_gallery': true,
'styling': false,
'max_tries': 1,
'callback': cacheFeed,
'styling': true,
'items': 5,
'items_per_row': 5,
'margin': 1,
'lazy_load': true,
'on_error': console.error,
'host': "https://images" + ~~(Math.random() * 3333) + "-focus-opensocial.googleusercontent.com/gadgets/proxy?container=none&url=https://www.instagram.com/",
'cache_time': 660
}