Hi
The Facebook connect code is eluding me a bit. I have no problem doing a login, and a wall post, however, I simply can not figure out how the delegate methods for the FBDialog andFBStreamDialog is supposed to work.
- (void)postToWall {
FBStreamDialog *dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.delegate = self;
dialog.userMessagePrompt = @"Enter your message:";
dialog.attachment = [NSString stringWithFormat:@"JSONpost code"];
[dialog show];
}
I adhere to these protocols in my controller:
<FBDialogDelegate, FBSessionDelegate, FBRequestDelegate>
I then implement the two methods:
- (void) dialogDidCancel:(FBDialog *)dialog {
NSLog(@"Failed");
}
- (void) dialogDidSucceed:(FBDialog *)dialog {
NSLog(@"Success");
}
After I tap "publish" and the postToWall methods is done executing the Facebook "pop up" in the UI is empty, except a small "X" in the top right corner and a "F" (facebook logo) in the top left corner.
The UI will stay there until I tap the "X", this results in the dialogDidCancel
delegate method being called. The post data is showing up on the Facebook page, everything seems to work.
Why is thedialogDidSucceed
method never called? I need this to release my facebook controller and restore the UI back to where the user was before "starting" FB Connect.
Thank You:)