Facebook登录而不离开应用程序

时间:2017-02-13 02:56:57

标签: ios objective-c facebook facebook-graph-api

虽然我已经看到了一些关于此的问题,但我找不到具体的答案。

我使用登录按钮FBSDKLoginButton在我的iOS应用中使用Facebook登录,而本地facebook app始终在屏幕上打开以进行授权。它显示了消息"您已经授权此应用程序",当我按下确定时,我会回到我的应用程序并且登录正常。

现在,我已经看到很多应用程序,这不是行为,它只是登录而不离开应用程序。我怎样才能实现这种行为?

我试过facebookLoginButton.loginBehavior = FBSDKLoginBehaviorSystemAccount;但没有运气。

更新

这是de button设置:

// Facebook
    self.facebookLoginButton.readPermissions = @[@"public_profile", @"email", @"user_friends", @"user_hometown", @"user_location", @"user_birthday", @"user_actions.fitness"];
    self.facebookLoginButton.publishPermissions = @[@"publish_actions"];
    self.facebookLoginButton.loginBehavior = FBSDKLoginBehaviorSystemAccount;
    self.facebookLoginButton.delegate = self;

0 个答案:

没有答案