可以在Facebook的“单一登录”在移动网络应用程序中实现? [英] Can Facebook's "Single Sign On" be achieved within a mobile web app?

查看:203
本文介绍了可以在Facebook的“单一登录”在移动网络应用程序中实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次在这里发帖(虽然我一直在使用这个网站参考一段时间)。

It's my first posting on here (although I've been using this site for reference for quite some time).

我已经尝试了好几天了在移动网络应用程序(不是原生的iOS或Android应用程序)中查找或梦想使用Facebook的单一登录功能,如果用户已经从本地Facebook登录到Facebook,则可以自动将用户登录到网络应用程序中例如,他们的移动设备上的应用程序。

I've been trying for several days now to find or dream up a way to use Facebook's "Single Sign On" from within a mobile web app (not a native iOS or Android app) to automatically sign a user into a web app if they are already logged into Facebook from the native Facebook app on their mobile device for example.

我的有限的知识告诉我,由于移动浏览器和系统(例如iOS),无法做到这一点,太分开了(我不能,我不认为,让我的移动网络应用程序以任何方式使用或访问移动设备上的本机Facebook应用程序)。

My limited knowledge is telling me that it can't be done since the mobile browser and the 'system' (iOS for example) are too separated (I can't, I don't think, have my mobile web app use or access the native Facebook app on a mobile device in any way).

我已经找到并阅读了Facebook提供的iOS,Android AND Mobile文档(https://developers.facebook.com/docs/guides/mobile/),这些都似乎有足够的意义,但经过几天的拖网捕获我可以在这个问题上找到如果他/她已经登录到Facebook,ere似乎不是一种使用方式,例如iPhone或Android设备上的Facebook应用程序,可以自动将用户登录到我的网络应用程序。

I have found and read the iOS, Android AND Mobile documentation provided by Facebook (https://developers.facebook.com/docs/guides/mobile/) which all seems to make enough sense, but after days of trawling through everything else I could find on the subject there doesn't seem to be a way to use, for example, the Facebook app on an iPhone or Android device to automatically log a user in to my web app if he/she is already logged into Facebook.

我已经阅读了许多关于在第三方原生应用程序中进行此操作,还有其他人试图从桌面应用程序中实现类似的功能,但我正在努力,希望能够实现这一点来自在移动网络浏览器中运行的网络应用程序。

I've read lots about doing this from within 3rd party native apps and also other people trying to achieve a similar thing from within Desktop apps but I'm trying and hoping to be able to achieve this from a web app running within a mobile web browser.

我非常感谢任何帮助,意见或指向正确的方向,因为我认为这将是一个

I'd be very grateful for any help, opinions or pointers in the right direction since I think this would be an excellent step forward in UI for mobile web apps to have (not just the native apps).

非常感谢提前...

推荐答案

可能晚了一点,但是如果有人想知道是的,可以使用Cordova / Phonegap和Facebook Connect插件: https://github.com/davejohnson/phonegap-plugin-facebook-connect/

Probably a bit late to the party but in case anyone else is wondering yes it's possible with Cordova/Phonegap and the Facebook Connect Plugin: https://github.com/davejohnson/phonegap-plugin-facebook-connect/

启动时使用FB.getLoginStatus()方法允许检查用户是否已使用本机Facebook App登录并检索其配置文件。

Using the FB.getLoginStatus() method at startup allows to check if the user is already signed in with the native Facebook App and retrieve its profile. More details in the examples provided in the repo.

这篇关于可以在Facebook的“单一登录”在移动网络应用程序中实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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