当使用Facebook连接的iPhone应用程序时,我遵循SSO指南(http://developers.facebook.com/docs/guides/mobile/)但我讨厌SSO将我发送到Safari页面。我想在对话框中进行身份验证。
请告诉我你是否遇到过同样的问题。谢谢。
答案 0 :(得分:1)
在Facebook.m
中,您需要更改以下代码:
- (void)authorize:(NSArray *)permissions
delegate:(id<FBSessionDelegate>)delegate {
[_permissions release];
_permissions = [permissions retain];
_sessionDelegate = delegate;
/* safariAuth should be NO */
[self authorizeWithFBAppAuth:NO safariAuth:NO];
/*
authorizeWithFBAppAuth: will launch the Facebook App
safariAuth: will launch Mobile Safari
When both of these are set to NO, the Facebook Login
Dialog will appear inside of your app.
*/
}