I’m trying to use the code provided in the tutorial here
AppDelegate *appDelegate = [[UIApplication sharedApplication]delegate];
NSMutableDictionary* params =
[NSMutableDictionary dictionaryWithObjectsAndKeys: [NSString stringWithFormat:@"I just smashed %d friends! Can you beat it?", 3], @"message",
nil];
[appDelegate.facebook dialog:@"apprequests" andParams:params andDelegate:nil];
But when the execution hits the dialog:andParams:andDelegate method call, nothing happens. For a split second I can see a progress indicator spinning, but then it disappears and no apprequests dialog is shown. No error is reported, but nothing happens.
I also tried defining a delegate, but neither of it’s callback methods get called.
I’m authenticated and the facebook session is valid at the time when I try to call this dialog.
Has someone encountered anything like this? Are any special permissions needed when logging in to be able to see this dialog?
I figured it out. I was invoking the dialog from a UIAlertView event handler, so probably it was not on the UI thread, which caused the error. If I invoke the code above from an IBAction handler, everything works fine.