[英]Facebook iOS SDK is not working on device (requires valid redirect URI) but in simulator
I know there are already a few topics like this, but I red them all and I haven't found the solution yet. 我知道已经有一些这样的主题,但是我将它们全部涂成红色,但尚未找到解决方案。
I implemented the Facebook iOS SDK as in the tutorial described, every single step, but on my iPad it is opening Safari with Facebook and it is prompting me to login. 我按照教程中所述的步骤实施了Facebook iOS SDK,但是在我的iPad上,它正在使用Facebook打开Safari,并提示我登录。
So far so good, but then I see the blue bar on the top with Cancel, appname and Login, nothing else. 到目前为止一切顺利,但随后我看到顶部的蓝色栏显示“取消”,“应用程序名称”和“登录名”,仅此而已。 Either when Im pressing Cancel or Login I get the following error:
当我按“取消”或“登录”时,出现以下错误:
An error has occurred in your app... (translated from german)
您的应用程式发生错误...(翻译成德文)
API Error Code: 100API错误代码:100
API Error Description: Invalid parameterAPI错误说明:参数无效
Error Message: Requires valid redirect URI.错误消息:需要有效的重定向URI。
I have no idea, what to do. 我不知道该怎么做。 I double checked App-ID, info.plist, switched on and off Enhanced Auth Dialog in FB settings.
我仔细检查了App-ID,info.plist,在FB设置中打开和关闭了“增强身份验证对话框”。
In the simulator I can see the result as in the tutorial described, without any error. 在模拟器中,我可以看到所描述的教程中的结果,而没有任何错误。
I would appreciate any help, thanks. 我将不胜感激,谢谢。
PS: There are some warning about unimplemented methods in xcode. PS:关于xcode中未实现的方法有一些警告。 fbSessionInvalidated and fbDidNotLogin are missing, where do I get them from?
fbSessionInvalidated和fbDidNotLogin丢失了,我应该从哪里得到它们?
Difference between device and simulator. 设备和模拟器之间的区别。 The dialogs on the device are in german, in the simulator in english.
设备上的对话框为德语,在模拟器中为英语。 Don't know if that might be importend.
不知道那可能是重要的。
I got it, after spending a day of troubleshooting... 经过一天的故障排除后,我知道了...
The safari setting "private surfing" (Privates Surfen) was switched on and disturbed the communication between app and facebook sdk. Safari设置“私人冲浪”(Privates Surfen)已打开,并扰乱了应用程序与Facebook SDK之间的通信。
I switched it off and everything runs like charm and like in the simulator (where this setting isn't existing). 我关闭了它,一切都像在模拟器中一样运行(就像该设备一样不存在)。
Hope this helps somebody else. 希望这对其他人有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.