Titanium iOS - Facebook SSO 不返回应用程序 [英] Titanium iOS - Facebook SSO not returning to App

查看:26
本文介绍了Titanium iOS - Facebook SSO 不返回应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近使用 Appcelerator 的 Titanium 在我的应用程序中添加了 Facebook 单点登录.哪个运行良好,但在显示已授权"Facebook 页面时无法自动重定向回我的应用程序.

I've recently added Facebook Single Sign On within my application using Appcelerator' Titanium. Which is working nicely but is failing to redirect back to my application automatically when presented with the "Already Authorized" facebook page.

如果用户点击 facebook 中的好的"按钮,应用程序将重新打开并照常工作.我只是想为用户摆脱这个额外的步骤.

If the user clicks the "Okay" button within facebook the Application re-opens and works as per usual. I'm just looking to get rid of that extra step for users.

有什么建议吗?我遇到过 Objective C 解决方案,例如:Facebook iOS SDK 是否要求用户每次使用应用程序时都进行身份验证?

Any suggestions? I've come across Objective C solutions such as : Does the Facebook iOS SDK require the user to authenticate every time they use the app?

干杯,汤姆

推荐答案

我认为该问题与 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.

这篇关于Titanium iOS - Facebook SSO 不返回应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆