简体   繁体   English

Facebook 站点集成 -> fb 登录按钮与 fb 注册?

[英]Facebook site integration -> fb-login button vs fb-registeration?

I have a website that I am writing.我有一个我正在写的网站。

  • javascript SDK works javascript SDK 有效
  • php SDK works php SDK 工作

HTML looks like the following: HTML 如下所示:

  1. signup page with fb-registration div带有 fb-registration div 的注册页面
  2. login page with fb-login-button div带有 fb-login-button div 的登录页面

Flow:流动:

  1. First time user ( which is registered to facebook), decide to signup.首次用户(已注册到 facebook),决定注册。 Signup page -> press "Register" -> fb iframe -> press "Continue" -> POST to PHP -> save user to DB -> reload page -> user is verified.注册页面 -> 按“注册” -> fb iframe -> 按“继续” -> POST 到 PHP -> 将用户保存到数据库 -> 重新加载页面 -> 用户已验证。
  2. First time user ( which is registered to facebook), decide to login.第一次用户(已注册到 facebook),决定登录。 ( never signed-up). (从未注册)。 Login page -> press "Login with Facebook" -> blorp happens -> ????登录页面 -> 按“使用 Facebook 登录” -> blorp发生 -> ????

Question:问题:

  1. if my javascript SDK already know if the user logged in or not, why do I need the login button?如果我的 javascript SDK 已经知道用户是否登录,为什么我需要登录按钮?
  2. is it possible to use the website facebook api without facebook app?是否可以在没有 facebook 应用程序的情况下使用网站 facebook api?
  3. isn't there a conflict between the register and login ?注册和登录之间没有冲突吗?
  4. what happens on the blorp ?? blorp 上会发生什么? and following that question, is it just for getting the user information purpose?并遵循该问题,是否仅用于获取用户信息目的?
  1. Display the login facebook button only to users that are NOT logged now with facebook.仅向现在未使用 facebook 登录的用户显示登录 facebook 按钮。
  2. You must be more precise, you have a website OR a facebook application, some API functions works differently.你必须更精确,你有一个网站或一个 facebook 应用程序,一些 API 函数的工作方式不同。

3.4. 3.4. The conflict is in your flow logic, you cannot login in your website a user that hasnt a registered account yet.冲突在于您的流程逻辑,您无法在您的网站上登录尚未注册帐户的用户。

I suggest to get rid of the register, and use an auto-register and/or auto-login:我建议摆脱注册,并使用自动注册和/或自动登录:

  • user enter website用户进入网站
  • Is NOT logged on facebook - show login to facebook button, return here after he logins未登录 facebook - 显示登录 facebook 按钮,登录后返回此处
  • is logged on facebook - show your own login button into site (you can auto-login as well, if you find his email address in your database, and he previous accepted your application).已登录 facebook - 在网站上显示您自己的登录按钮(如果您在数据库中找到他的电子邮件地址,并且他之前接受了您的申请,您也可以自动登录)。
  • he press the login他按下登录
  • you check if is in database, login, if not - register, then login in the same request.你检查是否在数据库中,登录,如果不是 - 注册,然后在同一个请求中登录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM