0
我使用此代碼分享至Facebook:Facebook連接圖形API得到通知時,成功分享給Facebook
[appDelegate.facebook dialog:@"feed" andParams:params andDelegate:appDelegate];
我怎樣才能得到通知(如sharekit)時,共享是成功的?
我想顯示UIAlertView,但我不知道我需要把UIAlertView的Facebook方法。
我嘗試這個方法:
- (void)dialogDidSucceed:(NSURL *)url {
if ([_delegate respondsToSelector:@selector(dialogCompleteWithUrl:)]) {
[_delegate dialogCompleteWithUrl:url];
}
UIAlertView * alert=[[UIAlertView alloc]
initWithTitle: @"Sharing to Facebook"
message: @"Success"
delegate:self
cancelButtonTitle:@"Close"
otherButtonTitles:nil, nil];
[self setAlertSuccess:alert];
[alertSuccess show];
[alert release];
NSLog(@"SUCCESS 2");
[self dismissWithSuccess:YES animated:YES];
}
然而工作,當我點擊取消按鈕,這種方法也被稱爲。那麼把成功警報視圖放在哪裏是正確的?