且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Titanium iOS - Facebook SSO 不返回应用程序

更新时间:2023-02-16 22:11:43

我认为该问题与 Facebook 应用程序设置不正确以及未直接在设备而非模拟器上进行测试有关.

I believe the issue was related to the Facebook App not being setup properly and not directly testing on a device instead of the simulator.

应在您的 Facebook 应用程序中应用以下设置.

The following settings should be applied within you Facebook Application.

启用:原生 iOS 应用

  • iOS 捆绑 ID:com.yourcompany.yourapp
  • iPhone 应用商店 ID:24242423
  • 为 iOS SSO 配置:已启用

由于未安装 Facebook 应用程序,在模拟器上进行测试将触发 Safari 打开并显示授权对话框(因此您需要真实设备).如果发生错误、已授权或成功,则将您的应用推送到设备并触发应用内的 SSO 将重定向回您的应用.

Testing on the simulator will trigger Safari to open and show the Authorization dialog due to the Facebook App not being installed (hence why you need a real device). Pushing your app to the device and triggering the SSO within your application will then redirect back to your application if an error, already authorized or success occurs.

希望这可以帮助任何遇到这种情况的人.

Hope this helps anyone that's had this occur.