Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Instagram公共API的新CORS政策?_Javascript_Ajax_Cors_Instagram Api_Referrer Policy - Fatal编程技术网

Javascript Instagram公共API的新CORS政策?

Javascript Instagram公共API的新CORS政策?,javascript,ajax,cors,instagram-api,referrer-policy,Javascript,Ajax,Cors,Instagram Api,Referrer Policy,我将这些端点与JavaScript Ajax结合使用,以获取Instagram用户信息和帖子: 以前没有CORS策略错误,但现在我得到了该错误(不是每次刷新页面时,而是几乎95%的次数): 在'https://www.instagram.com/hannahstocking/?__a=1“起源”https://sitename.com'已被CORS策略阻止:请求的资源上不存在'Access Control Allow Origin'标头。 Instagram是否已开始阻止这些端点或添加了新的

我将这些端点与JavaScript Ajax结合使用,以获取Instagram用户信息和帖子:

以前没有CORS策略错误,但现在我得到了该错误(不是每次刷新页面时,而是几乎95%的次数):

在'https://www.instagram.com/hannahstocking/?__a=1“起源”https://sitename.com'已被CORS策略阻止:请求的资源上不存在'Access Control Allow Origin'标头。


Instagram是否已开始阻止这些端点或添加了新的速率限制?如何解决此问题?

Instagram在跨源时引入了严格的源站政策,并且只允许以下跨源站点:

  • https://*.fbcdn.net
  • https://*.instagram.com
  • https://*.cdnistagram.com
  • https://*.facebook.com
  • https://*.fbsbx.com
这让我相信他们正在限制网站显示API数据。数据本身仍然可以访问,只是不能直接通过网站访问。
您需要使用代理或服务器来解决此问题

我也有同样的问题,如果您解决了此问题,请在此处共享。如果您收到此错误消息,则现在没有CORS策略
Access Control Allow Origin
是您设置CORS策略的方式。我也有同样的问题,但这不是与instagram传输策略有关吗?在这里看到同样的情况,您会喜欢一个解决方案。实际上,IG似乎正在迫使您现在登录以查看站点?