iPhone FBConnect对话框消失
所以我一直在尝试通过 FB connect 将 FB 与我的 iPhone 应用程序集成。但是,使用教程(http://www.mobisoftinfotech.com/blog/iphone/iphone-fbconnect-facebook-connect-tutorial/)后,似乎当调用FBDialog框时,它会在屏幕上弹出一些时间秒然后消失。我不确定发生了什么,因为它在模拟器中运行得很好。我有一台 iPhone 4 设备。下面是我的代码:
(void)viewDidLoad { [超级viewDidLoad];
session = [[FBSession sessionForApplication:@"MYAPIKEY" 秘密:@"MYSECRET" 委托:self] 保留];
FBLoginButton *button = [[[FBLoginButton alloc] init] autorelease];
[按钮 setFrame:CGRectMake(100, 100, 100, 50)];
[self.view addSubview:button];
}
So I've been trying to integrate FB with my iPhone application with FB connect. However, after using the tutorial (http://www.mobisoftinfotech.com/blog/iphone/iphone-fbconnect-facebook-connect-tutorial/), it seems when the FBDialog box is called, it pops onto the screen for a few seconds and then disappears. I'm not sure what is going, becuase IT WORKS in the Simulator perfectly. I have an iPhone 4 device. Here is my code below:
(void)viewDidLoad {
[super viewDidLoad];session = [[FBSession sessionForApplication:@"MYAPIKEY" secret:@"MYSECRET" delegate:self] retain];
FBLoginButton *button = [[[FBLoginButton alloc] init] autorelease];
[button setFrame:CGRectMake(100, 100, 100, 50)];
[self.view addSubview:button];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没关系,我很抱歉自己是个菜鸟。事实证明,我花了三个小时的努力来解决这个问题完全是浪费。问题是——我的 iPhone 没有连接到 Wifi/蜂窝网络。
Nevermind, I'm sorry for being a noob. Turns out my three hour struggle to figure this out was a complete waste. The problem -- my iPhone wasn't connected to Wifi/cell network.