0

I have a website that have facebook connection and classic user_name/password login. The system currently works if user clicks facebook_connect button. However, I want to link existing account to facebook because user can choose to login with his/her user_name, password credentials and also want to make facebook auto-connected after clicking facebook connect button. I have a field namely fb_connect (1 or 0) that holds if user uses facebook connect or not. So, the scenario is the following ;

1) I chosed to register with facebook connect. I clicked facebook connect button and got $user field. My website make a registration process, gets facebook email, generates a password and sends login credentials to the email address to make user also login with email/password.

2) When I got the email, I say : "Well, it looks ok, let me try with these login credentials( email/password) and check if the website already linked the account with these credentials"

3) I enter the website and used normal login. (PROBLEM 1 OCCURS HERE) My website checks if fb_connect is 1 or 0. if it's 1 then, my website calls FB.login function in the javascript sdk of facebook.

PROBLEM 1 : If users have existing account and use classic login, I don't want users to see an empty dialog flashes for 1-2 seconds after each login to the system.

PROBLEM 2 : When I open private browsing in chrome or mozilla and use classic login like in the problem 1's case, facebook popup wants facebook user_name and password to login. But, I certainly don't want that.

I looked at twitter and opened a private tab. After logging in to twitter and check if facebook is linked or not, twitter says my existing account is linked. I say "How's that happened ? Twitter doesn't make me enter login credentials for facebook ??? "

I think I'm doing something wrong. I really need help. I'm using php. Some logical statements, algorithms and code is needed. Any help will be greatly appreciated.

4

1 回答 1

1

我看了推特,打开了一个私人标签。登录 twitter 并检查 facebook 是否已链接后,twitter 说我现有的帐户已链接。我说“这是怎么回事?Twitter 不会让我输入 facebook 的登录凭据???”

唯一合乎逻辑的解释 IHMO:您过去已经将您的 twitter 与您的 Facebook 帐户连接起来,他们只是在他们的数据库中查找该信息,此时实际上并未从 Facebook 查询任何数据。

问题 1:如果用户有现有帐户并使用经典登录,我不希望用户在每次登录系统后看到一个空对话框闪烁 1-2 秒。

与其保存该信息,他们甚至在将其与 Facebook 连接之前就拥有了自己的帐户,resp。也没有在您的数据库中使用 Facebook创建它。

问题 2:当我在 chrome 或 mozilla 中打开隐私浏览并使用问题 1 中的经典登录时,facebook 弹出窗口需要 facebook 用户名和密码才能登录。但是,我当然不希望这样。

然后不要使用私人浏览。如果您使用 FB.login 并且 Facebook 无法判断用户是否已登录 Facebook,则无法不被要求登录Facebook

于 2012-07-04T10:58:20.670 回答