简体   繁体   English

Facebook iOS SDK在设备上不起作用(需要有效的重定向URI),但在模拟器中

[英]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: 100 API错误代码:100
API Error Description: Invalid parameter API错误说明:参数无效
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.

相关问题 Tabbarcontroller在模拟器上工作而不在iOS设备上 - Tabbarcontroller is working in simulator not on iOS device UIImagePickerController在iOS设备上工作但在iOS模拟器上没有? - UIImagePickerController working on iOS device but not on iOS simulator? 背景音频在iOS模拟器上可运行,但不能在设备上运行 - background audio working on iOS simulator but not device 音频和振动在模拟器中工作,而不是在ios设备上 - Audio and vibrate working in simulator not on ios device 自动旋转仅在设备上的模拟器中有效(IOS 7.1) - Autorotation only working in simulator not on device (IOS 7.1) free()使用iOS Simulator,但不能在实际设备上使用 - free() working with iOS Simulator but not on real device 本地通知可在ios模拟器上运行,但不能在设备上运行 - Local notifications working on ios simulator but not on device 屏幕截图代码可以在Simulator中完美运行,但不能在iOS Device中运行 - Screenshot code working perfectly in Simulator but not in iOS Device Google Map ios SDK无法在设备中使用,但可以在模拟器中使用 - Google Map ios sdk does not work in device, but work in simulator wsdl2objc在ios 6.0模拟器上不起作用,但在ios 5设备上起作用 - wsdl2objc is not working on ios 6.0 simulator but works on ios 5 device
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM