Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/98.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
Instagram API阻止在成功登录时重定向到iOS应用程序,但出现400个错误请求错误_Ios_Iphone_Instagram - Fatal编程技术网

Instagram API阻止在成功登录时重定向到iOS应用程序,但出现400个错误请求错误

Instagram API阻止在成功登录时重定向到iOS应用程序,但出现400个错误请求错误,ios,iphone,instagram,Ios,Iphone,Instagram,我正在尝试将Instagram登录集成到我的应用程序中以获取登录用户的详细信息,我已经在Instagram上注册了我的应用程序并获得了我的客户端ID,然后我在项目设置中添加了一个新的URL类型,标识符为:igxxxx(其中xxxx是我的客户端ID),我还将重定向URI设置为(xxxx://authorize),一旦我成功登录(使用webView),Instagram会显示一个白色空白页面,上面写着(400错误请求)文本,但是,当我将重定向URI更改为其他内容时,它会在成功登录后毫无问题地打开。

我正在尝试将Instagram登录集成到我的应用程序中以获取登录用户的详细信息,我已经在Instagram上注册了我的应用程序并获得了我的客户端ID,然后我在项目设置中添加了一个新的URL类型,标识符为:
igxxxx
(其中xxxx是我的客户端ID),我还将重定向URI设置为(
xxxx://authorize
),一旦我成功登录(使用webView),Instagram会显示一个白色空白页面,上面写着(
400错误请求
)文本,但是,当我将重定向URI更改为其他内容时,它会在成功登录后毫无问题地打开。
在用户使用Instagram登录后,如何将其重定向到应用程序

p、 在美国,我习惯于放松


提前谢谢。

这是我到目前为止发现的。我已经能够解决这个问题,让应用程序在iPhone上运行。但是,此解决方案不允许我在app store上提交应用,因为您将在前面阅读。我已经提交了instagram的一个bug,不知道需要多长时间

我建议大家访问此链接并“报告问题”:

我在app store中有一个应用程序已经有几个月没有问题了。 然而,自6月19日起,所有试图进行身份验证的用户在使用IG帐户登录后都会得到一个带有“400错误请求”的白色页面

此问题非常常见,您将在此堆栈溢出页面上看到:

自6月19日以来,谷歌在许多用户身上也出现了同样的问题

我发现我们使用的旧重定向URI:

myappname://
这就是问题所在

如果我们将此重定向URI更改为:

http://myappname

这一切开始运作良好,我们得到了访问令牌

但是,根据RFC1738,这不是iOS开发中使用的URL方案的有效格式

因此,我们在向应用商店提交应用程序时出错:

ERROR ITMS-90158: "The following URL schemes found in your app are not in the correct format: [https: //myappname]. URL schemes need to begin with an alphabetic character, and be comprised of alphanumeric characters, the period, the hyphen or the plus sign only. Please see RFC1738 for more detail."
ERROR ITMS-90158: "The following URL schemes found in your app are not in the correct format: [https: //myappname]. URL schemes need to begin with an alphabetic character, and be comprised of alphanumeric characters, the period, the hyphen or the plus sign only. Please see RFC1738 for more detail."
因此我们无法使用此解决方案提交到应用商店。


因此,除非instagram采取措施将其恢复到以前的状态,否则我们将陷入困境:(

这方面有什么更新吗?即使在安卓系统中,它也会抛出400。它以前工作得很好。如果你将重定向URI更改为其他任何东西,它会工作,顺便说一句,如果你在应用程序中显示web视图以登录Instagram,那么你就不必使用xxxx://authorize URI,因为你已经在应用程序中,不必让Instagram将您重定向到该应用程序,听起来Instagram API不赞成xxxx的重定向URI方案:///Authorized在这些更改后是否可以为您工作?FWIW根据我的测试,不以
http
https
开头的URL从昨天/今天起停止工作。我们必须对代码进行一些重新调整,以使其在没有更改的情况下工作重定向uri,但现在看起来没问题。@Jordanbonittis将您的重定向url更改为以
http
https
开头的任何内容,并使用UIWebView进行身份验证,而不是重定向到Instagram并返回到您的应用程序。我没有得到任何响应:(等一下……为什么您在“url方案”下有这些内容不仅仅是一个普通的“InstagramAppRedirectURL”字符串?你在应用程序中的重定向URL具体设置在哪里?为什么要添加一个新的URL类型?这个问题是否有更新?建议的修复方法?谢谢有更新问题吗?有什么替代方法?
ERROR ITMS-90158: "The following URL schemes found in your app are not in the correct format: [https: //myappname]. URL schemes need to begin with an alphabetic character, and be comprised of alphanumeric characters, the period, the hyphen or the plus sign only. Please see RFC1738 for more detail."
ERROR ITMS-90158: "The following URL schemes found in your app are not in the correct format: [https: //myappname]. URL schemes need to begin with an alphabetic character, and be comprised of alphanumeric characters, the period, the hyphen or the plus sign only. Please see RFC1738 for more detail."