简体   繁体   中英

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.

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 Error Description: Invalid parameter
Error Message: Requires valid redirect 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.

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. fbSessionInvalidated and fbDidNotLogin are missing, where do I get them from?


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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM