iOS Facebook sdk登录对话框显示两次(2个登录对话框) [英] IOS Facebook sdk login Dialog shows up twice (2 login dialogs)
问题描述
我的问题与此非常相似: "Facebook SDK登录"对话框出现两次
my question is very similar to this: Facebook SDK Login dialog appears twice
登录对话框出现两次.如何解决此问题?"
" login dialog appears twice. How can I solve this problem?"
除了,我正在使用此单例与Facebook sdk进行通信: http://matt-swain.com/post/21160566904/facebook- ios-sdk-singleton (我正在使用的代码) http://barrycenter.com/BAM!coding/2011 /07/simplifying-facebook-ios-sdk/(包括说明的旧版本)
Except, I am using this singleton for communicating with the Facebook sdk: http://matt-swain.com/post/21160566904/facebook-ios-sdk-singleton (thats the code I'm using) http://barrycenter.com/BAM!coding/2011/07/simplifying-facebook-ios-sdk/ (old version including explanations)
我的代码和原始单例代码之间的唯一区别是我有一个方法:
The only difference between my code and the original singleton one is that I have a method:
-(void) postToWallWithDialog:(int)count2 {
NSMutableDictionary* params = [self buildPostParams:count2];
[self dialog:@"feed" andParams:params andDelegate:self]; //post
} //buildPostParams just makes a dictionary, nothing else.
我不想从fbDidLogin中调用我的方法,因为它需要从视图控制器中调用.
I do not want to call my method from within fbDidLogin, because it needs to be called from the view controller.
如何消除第二个登录对话框?
how do i eliminate the second login dialog?
谢谢!
推荐答案
我最终使用FBNotifications来检查用户是否实际上陷入了混乱,以及是否存在有效的会话.知道了这一点,我贴到墙上,消除了第二个对话框.
I ended up using FBNotifications to check if user in fact flogged in and whether or not there was a valid session. Knowing that, I posted to the wall and it eliminated the second dialog.
这篇关于iOS Facebook sdk登录对话框显示两次(2个登录对话框)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!