iOS 将纯文本分享到 Facebook Messenger

问题描述

我正在尝试使用最新的 Facebook SDK 将纯文本共享到 Facebook Messenger 表单 iOS 应用程序。 在文档中它说

不支持引用属性。

您还可以分享链接、图片、视频和模板。

这是链接共享示例

     guard let url = URL(string: "https://newsroom.fb.com/") else {
        preconditionFailure("URL is invalid")
    }

    let content = ShareLinkContent()
    content.contentURL = url
    let dialog = MessageDialog(content: content,delegate: self)
    do {
        try dialog.validate()
    } catch {
        print(error)
    }

    dialog.show()

我也尝试添加 URLs 引用属性,但它不起作用

  guard let url = URL(string: "https://newsroom.fb.com/") else {
        preconditionFailure("URL is invalid")
    }

    let content = ShareLinkContent()
    content.contentURL = url
    content.quote = "Hello This is Quote"
    let dialog = MessageDialog(content: content,delegate: self)
    do {
        try dialog.validate()
    } catch {
        print(error)
    }

    dialog.show()

有什么分享文字的方法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)