本地Facebook登录体验通过浏览器 [英] Native Facebook Login experience via browser

查看:196
本文介绍了本地Facebook登录体验通过浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到了这个问题的几种风格,但没有什么具体的,也没有回答,所以尝试一下。



我正在尝试通过浏览器到我的基于Facebook的应用程序,这将需要用户尽可能不记得他们的密码。这意味着如果




  • 他们通过他们的桌面浏览器登录并已经登录,它只会要求他们确定权限

  • 他们从他们的手机浏览器登录,并通过各自的本机应用程序(Android / iOS)登录,只需将其重定向到本机应用程序,请求应用程序权限和重定向他们返回到浏览器上的成功页面

  • 他们从任何浏览器登录,目前没有以任何形式登录到Facebook,他们必须输入他们的密码和身份验证(无论是本地还是通过浏览器这没关系)



我知道第一个可以完成的 - 这是使用JS SDK非常简单的。第二点是更艰难的一点。



我知道现有的Android和iOS的自定义URL方案,但没有具体提到如何将它用于身份验证和/或Facebook应用的授权有人有什么想法可以做到这一点吗?



谢谢!

解决方案>

我想你正在寻找(至少对于Android)是启动一个意图在特定的模式,将打开Facebook应用程序。



这里回答这里< a href =https://stackoverflow.com/questions/13107857/android-facebook-intent-to-show-profile-with-class-com-facebook-katana-profileta/13107858#13107858> Android facebook意图展示配置文件与com.facebook.katana.ProfileTabHostActivity类不再工作


I have seen several flavours of this question going around but nothing exactly specific nor answered so trying it myself.

I am trying to build a Facebook login experience via the browser into my Facebook-based app that will require the users to not remember their passwords as much as possible. This means that if

  • they log in via their desktop browser and are already logged in, it will only ask them to 'OK' the permissions
  • they log in from their mobile browser and are logged in via their respective native app (Android/iOS), it will simply redirect them to the native app, ask for the app permissions and redirect them back to the success page on the browser
  • they log in from any browser and are not currently logged onto Facebook in any form, they have to enter their password and authenticate (whether natively or via browser this does not matter)

I know how the first can be done - that is pretty straightforward using the JS SDK. The second point is the tougher bit.

I am aware of existing custom URL schemes for Android and iOS but nothing specifically really mentions how that can be used for authentication and/or authorisation of Facebook apps. Does anyone have any ideas on how this can be done?

Thanks!

解决方案

I think what you are looking for (at least for Android) is starting an Intent on certain schema that will open Facebook app.

This is answered here Android facebook intent to show profile with class com.facebook.katana.ProfileTabHostActivity doesn't work any more

这篇关于本地Facebook登录体验通过浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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