ユーザーがFBDialogから継承するFBStreamDialogの[キャンセル]ボタンを押すと、ユーザーが[公開]ボタンをクリックしたときと区別するのに問題があります。コールバックFBDialogdismissWithSuccessは、どのボタンがクリックされたかに関係なく、常にstatus:NOで渡されるようです。私は何が間違っているのですか?ありがとう!
これが私のアプリのすべてのFBConnectを処理するクラスです:
@interface SocialMediaViewController : UIViewController <FBSessionDelegate, FBRequestDelegate, FBDialogDelegate> {...
これが私がログインをインスタンス化した方法です。
FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:self.fbSession] autorelease];
dialog.delegate = self;
[dialog show];
これが私がFBStreamDialogをインスタンス化した方法です。
FBStreamDialog* dialog = [[FBStreamDialog alloc] init];
dialog.delegate = self;
dialog.userMessagePrompt = @"Enter additional comment:";
dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"My name string %@\"," "\"href\":\"http://xyz.com/\"," "\"caption\":\"placeholder-%@\",\"description\":\"%@\"," "\"properties\":{\"More like this\":{\"text\":\"XYZ website\",\"href\":\"http://XYZ.com/\"}}}", self.curReview.businessName, self.curReview.reviewType, self.curReview.reviewDetail];
[dialog show];