我有一些代码与其他应用程序共享一个url(带有说明)。这段代码对facebook、instagram、twitter等都很好,但对facebook messenger不起作用。在脸谱网信使中,就好像URL不存在一样。它加载的是文本,而不是url。
以下是我正在使用的代码:
let activityViewController = UIActivityViewController(activityItems: [shareText, UserService.sharedInstance.sharingLink(profile)], applicationActivities: nil)
activityViewController.popoverPresentationController?.sourceView = self.view
let sourceRect = CGRect(x: 0, y: 0, width: self.view.frame.width, height: 1)
activityViewController.popoverPresentationController?.sourceRect = sourceRect
self.present(activityViewController, animated: true, completion: nil)
这段代码已经在我的应用程序中运行了一段时间,直到最近才发现它与Facebook Messenger不兼容。
FBM需要某种自定义处理才能正常工作吗?如果是,我在哪里可以看到这个示例/文档?为什么我的代码对除了FBM之外的所有应用都能正常工作?