首页 > 解决方案 > instagram embed api 的 JSONP mimetype 不匹配

问题描述

我们正在使用 JSONP 方法来加载 instagram 嵌入帖子,但是最近我们遇到了响应内容类型 mime 类型不匹配的问题。在不切换到 embed.js 或 json 的情况下修复 JSONP 方法的任何解决方案?

跨域读取阻止 (CORB) 阻止了具有 MIME 类型的跨域响应https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BJPIEc8BHEI/&hidecaption=false&callback=_jsonp_instagramImage_0应用程序/json。有关详细信息,请参阅https://www.chromestatus.com/feature/5629709824032768 。

和 IE:来自 ... 的资源由于 MIME 类型不匹配而被阻止

<script>仅通过创建和加载callback

标签: instagraminstagram-api

解决方案


脸书说:

此问题与此渠道不支持的旧版 Instagram API (api.instagram.com) 有关;此错误报告工具仅支持与 Instagram Graph API 相关的问题。此外,由于自 2018 年 7 月起已弃用旧版 Instagram API,团队不再接受此 API 的错误报告。感谢您的理解。

https://developers.facebook.com/bugs/235545030662906/

另请参阅https://github.com/sugarshin/react-instagram-embed/issues/89


推荐阅读