FBLoginDialog not shown
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)
精彩评论