简体   繁体   English

Facebook使用iOS应用程序中的另一个帐户登录

[英]Facebook Login with another account from iOS app

I'm developing an iOS app that integrates with Facebook SDK. 我正在开发一个与Facebook SDK集成的iOS应用程序。 When I make the login for the first time with my facebook account it takes the following steps: 当我第一次使用我的Facebook帐户登录时,它需要执行以下步骤:

  1. Jump to safari web login 跳转到safari web登录
  2. Insert my credentials 插入我的凭据
  3. After that I authorize the permissions that are requested 之后,我授权所请求的权限
  4. And then I go to the main menu of my application. 然后我转到我的应用程序的主菜单。

When I press the logout button, I run the following code: 当我按下注销按钮时,我运行以下代码:

- (void)logout {
     [FBSession.activeSession closeAndClearTokenInformation];
}

With this code I can invalidate the session and clear the access token information. 使用此代码,我可以使会话无效并清除访问令牌信息。 However, when i try to login again, my application jumps to safari web login and my account appears already as logged in (next picture). 但是,当我尝试再次登录时,我的应用程序跳转到safari Web登录,我的帐户已经登录(下一张图片)。

已经登录!

If I want to login with another Facebook account, i can't do it. 如果我想用另一个Facebook帐户登录,我不能这样做。 In other words, I would like to follow the steps that I said earlier or have a mechanism like "Not you?" 换句话说,我想按照我之前说过的步骤或者有一个像“不是你?”这样的机制。 that Facebook official app provides. Facebook官方应用程序提供。

Any idea that what I have to do? 知道我要做什么吗?

You're still logged in through Safari. 您仍然通过Safari登录。 Log out there (or clear your cache). 退出(或清除缓存)。

错误,发生在未登录safari和FB应用程序时。

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

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