开发者

Facebook single sign on in iOS issue

I just run the demo app for 开发者_运维技巧the single sign on Facebook and I am getting the following:

Facebook single sign on in iOS issue

And what I want is actually something like this:

Facebook single sign on in iOS issue

I wanted it to not show as a web view, how do I do that?


Please see my answer here (which answers this question):

FaceBook API, login in-app

Please also note my caveat. OAuth was designed to authenticate outside of your application - but in this case, you can make it work inside (but it breaks a core principle of OAuth).


When an app requests authorization or login, the application gets the user's login information via the browser (as you showed in the second image) or, if you have the Facebook app installed, from the Facebook app. It looks like you have the Facebook app installed, so the app automatically pulled the user's information from that app.

Then, for any new app that a user uses, Facebook verifies with the user that the app's requested features are allowed by the user.

Since your device pulled the login info from the Facebook app, the email/password screen is not used and the permissions screen is shown first. Once you allow the features, you should not see that screen again, when you start the app again for that same user.


Modify your Facebook.m

- (void)authorize:(NSArray *)permissions {
  self.permissions = permissions;

  // with both options NO, authorization always happens in-app
  [self authorizeWithFBAppAuth:NO safariAuth:NO];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜