我是 IOS 编程新手,我正在尝试使用以下方式向 Facebook 朋友发送消息
[FBSDKMessageDialog showWithContent:content delegate:(id)self];
我添加了如下回调:
- (void)sharer:(id<FBSDKSharing>)sharer didCompleteWithResults:(NSDictionary *)results
{
NSLog(@"complete");
}
- (void)sharerDidCancel:(id<FBSDKSharing>)sharer
{
NSLog(@"Cancelled")
}
但是当我在 FB messenger 中发送消息时不会调用共享器方法,而是sharerDidCancel
调用它。当用户取消或发送消息时调用该sharerDidCancel
方法,如何区分发送与取消?