Iphone facebook连接示例呼叫safari。我不想使用safari

[英]Iphone facebook connect example calls safari. I don't want to use safari


Iphone facebook connect example calls safari. I don't want to use safari. How to fix this problem.

Iphone facebook连接示例呼叫safari。我不想使用safari。如何解决这个问题。

9 个解决方案

#1


14  

I'm not sure if this is kosher but I commented out lines 131-145 in Facebook.m to pop open a UIWebView instead of opening up the login screen in Safari. Seems to work fine for me...

我不确定这是否是犹太洁食,但我在Facebook.m中注释了131-145行,以打开UIWebView而不是在Safari中打开登录屏幕。似乎对我来说很好......

#2


6  

Donkim's suggestion above worked well for me using the 1/31/2011 commit of the SDK. Another option is to look for each call to "authorizeWithFBAppAuth:safariAuth:" in Facebook.m. You can change the second argument from YES to NO on lines 221, 267, and 274.

Donkim上面的建议对我使用SDK的1/31/2011提交效果很好。另一种选择是在Facebook.m中查找每次调用“authorizeWithFBAppAuth:safariAuth:”。您可以在第221,267和274行将第二个参数从YES更改为NO。

#3


2  

Despite the fact that it open safari and that's ugly, you benefit from the SSO which is a great feature. If any other app is using FBConnect, you user will be automatically connected to yours. And if the facebook app is present, its even better, the login is done through the facebook app and no longer in safari.

虽然它打开野生动物园并且那很难看,但是你可以从SSO中受益,这是一个很棒的功能。如果任何其他应用程序正在使用FBConnect,您的用户将自动连接到您的用户。如果Facebook应用程序存在,它甚至更好,登录是通过Facebook应用程序完成,不再是在safari中。

So I suggest you keep it that way !

所以我建议你保持这种方式!

I agree that the whole process should be a bit improved and at least not open a new safari tab every time you connect ! Patience...

我同意整个过程应该有所改进,每次连接时至少不会打开一个新的Safari选项卡!忍耐...

#4


2  

If user has Facebook application for iphone, then it won't open safari. It will open directly Facebook App

如果用户有iphone的Facebook应用程序,那么它将无法打开safari。它将直接打开Facebook App

#5


1  

The problem with all these solutions is you lose a consistent auth_token. So if you need to do manual graph requests later on in your code by passing the auth_token in the URL, you simply can't.

所有这些解决方案的问题是您失去了一致的auth_token。因此,如果您需要稍后在代码中通过传递URL中的auth_token来执行手动图形请求,那么您根本无法做到。

#6


1  

Set safariAuth:NO on [self authorizeWithFBAppAuth:YES safariAuth:NO]; (facebook.m:221)

设置safariAuth:NO [self authorizeWithFBAppAuth:YES safariAuth:NO]; (facebook.m:221)

#7


0  

For anyone using a newer Facebook iOS SDK (not sure which version added it), you can use the dialog:@"oauth" ... method (doc). As others have said, you give up SSO, but for use cases like mine (an OpenGL game), I find the overlay preferable to switching to a different app.

对于使用较新的Facebook iOS SDK的用户(不确定添加了哪个版本),您可以使用对话框:@“oauth”... method(doc)。正如其他人所说的那样,你放弃了SSO,但是对于像我这样的用例(一个OpenGL游戏),我发现覆盖层更适合切换到另一个应用程序。

#8


0  

File: Facebook.m | Starts at: line #220 authorizeWithFBAppAuth:safariAuth: | Add boolean trySafariAuth = NO; to line #223

文件:Facebook.m |开始于:第220行authorizeWithFBAppAuth:safariAuth:|添加布尔值trySafariAuth = NO;到#223行

  /**
   * A private function for opening the authorization dialog.
   */    
   - (void)authorizeWithFBAppAuth:(BOOL)tryFBAppAuth
                        safariAuth:(BOOL)trySafariAuth {

        trySafariAuth = NO;
        // more code allow blow this, but im too lazy to show it
        // so please just change the boolean...
    }

#9


0  

Change following method as follows in facebook.m

- (void)authorize:(NSArray *)permissions
             delegate:(id<FBSessionDelegate>)delegate {

      [_permissions release];
      _permissions = [permissions retain];

      _sessionDelegate = delegate;

      [self authorizeWithFBAppAuth:NO safariAuth:NO];
       // [self authorizeWithFBAppAuth:NO safariAuth:YES];
    }

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2010/12/21/f21a2082227602e89c40c430ae89f8a0.html



 
© 2014-2018 ITdaan.com 粤ICP备14056181号