当用户点击从 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];