开发者

FBLoginDialog not shown

开发者 https://www.devze.com 2023-01-05 05:27 出处:网络
I\'m an iphone newb.I added the following code to my viewDidLoad() method but a blank screen shows up.What am I doing wrong?

I'm an iphone newb. I added the following code to my viewDidLoad() method but a blank screen shows up. What am I doing wrong?

FBSession *session = [FBSession sessionForApplication:@"a31c3e53bba4a5f2b3955d6e5e 876717" secret:@"6ecbefa3807406bd13187297e58efae9" delegate:self开发者_StackOverflow];

FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:session] autorelease];

[dialog show];

Thanks!


I put the code into the AppDelegate's didFinishLaunchingWithOptions method and it worked!


the call to [dialog show] has to occur on the main thread (as all UI related calls)

0

精彩评论

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

关注公众号