Facebook SSO如何知道要返回哪个应用? [英] How does Facebook SSO know which app to return to?

查看:155
本文介绍了Facebook SSO如何知道要返回哪个应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Facebook SSO(单点登录),在系统提示用户使用其Facebook帐户的权限后,它会将用户引导回运行SSO的应用程序.FB SSO具体如何实现此目的? (如何知道在授予权限后重新打开哪个应用程序?)

Using Facebook SSO (Single Sign on), after the system prompts the user for permissions to work with their Facebook account, it directs the user back to the app that SSO was being run in. How specifically does FB SSO accomplish this? (How does it know which app to reopen after the permissions are granted?)

我们正在构建一个与Facebook交互的SDK,目前尚不清楚facebook应用程序如何找出要返回的应用程序。

We are building a SDK that interacts with Facebook, and it is not clear how the facebook app figures out which app to return to.

推荐答案

当您添加Facebook SDK时,其中一个步骤是使用您的API密钥为您的应用注册URL方案。

When you add the Facebook SDK, one of the steps is to register a URL scheme for your app with your API key.

当您在Facebook上授权应用程序时,它会尝试打开URL(通常格式为fbXXXXXXXXXXX),因为您的应用程序已设置为处理此URL方案,因此应用程序已打开。

When you authorize the app in Facebook it tries to open the URL (usually formatted like fbXXXXXXXXXXX) and since your app is set to handle this URL scheme so the app is opened.

以下是您可以使用handleOpenURL进行交流的其他应用程序列表:

And here's a list of other apps you can communicate using handleOpenURL:

http://handleopenurl.com/

这篇关于Facebook SSO如何知道要返回哪个应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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