所以问题来了。重现步骤: Facebook SDK 3.2,任何 iPhone 设备
1.Login to the Facebook account in the iPhone Setting.
2.Launch the Scrumptious application.
3.Click on login button.
4.Accept the Permission.
5.Remove the application from the Device.
6.Remove the app from the Facebook App setting from the Accounts setting of ur Facebook.
7.Reinstall the application.
8.Clik on the login button.
Now here is the issue.It goes to the "Profile" Screen and then logs out automatically prompting `Your current session is no longer valid. Please log in again.`
为什么会这样?如何解决这个问题?
最佳答案
TL;DR:克服它的方法是再次登录(失败后)!
发生的情况是 iOS 不知道用户已从 Facebook 网站上删除了应用程序,因此它向应用程序发出缓存 token 。当应用程序尝试使用此 token 发出请求时,它将失败(因为 token 现在无效)。 SDK 会看到此错误并关闭您的 session ,但它还会告诉 iOS 使其缓存无效。因此,当您再次登录时,它会联系 Facebook 获取新 token 。
关于ios - Facebook登录问题iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17074798/