下面的头文件需要到Facebook 官网下载开发包
import
import
import
pragma mark - FBSDKSharingDelegate
(void)sharer:(id)sharer didCompleteWithResults:(NSDictionary *)results
{
NSLog(@”completed share:%@”, results);
}(void)sharer:(id)sharer didFailWithError:(NSError *)error
{
NSLog(@”sharing error:%@”, error);
NSString *message = error.userInfo[FBSDKErrorLocalizedDescriptionKey] ?:
NSLocalizedString(@”There was a problem sharing, please try again later!”,”“);
NSString *title = error.userInfo[FBSDKErrorLocalizedTitleKey] ?: NSLocalizedString(@”Reminder”, “”);[[[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:NSLocalizedString(@”O K”, “”) otherButtonTitles:nil] show];
[[SigtonUserInfo shareUserInfoArray] hiddenProgressView:self.parentViewController.view];
}(void)sharerDidCancel:(id)sharer
{
NSLog(@”share cancelled”);
[[SigtonUserInfo shareUserInfoArray] hiddenProgressView:self.parentViewController.view];
[[MainViewController shareMainViewController] hiddenShareView];
}