仅在Facebook中分享文字 [英] Share only text in facebook

查看:381
本文介绍了仅在Facebook中分享文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Facebook中共享预定义的文本.而且我只需要共享文本而不是图像或URL.但是得到这个错误.

I am sharing predefine text in facebook. and i need to share only text not image or url. But getting this error.

let content = FBSDKShareLinkContent()

content.quote = "test"

let shareDialog = FBSDKShareDialog()
shareDialog.fromViewController = self
shareDialog.shareContent = content
shareDialog.delegate = self

if !shareDialog.canShow() {
    print("cannot show native share dialog")
}

shareDialog.show()

推荐答案

由于平台政策,这是Facebook SDK的局限性.您可以在此处获取更多信息(在iOS上共享-Facebook ),但其中有一些单词-您无法通过Facebook Share窗口小部件共享预定义的文本:

It's limitation of Facebook SDK due to Platform Policy. You can get more information here (Sharing on iOS - Facebook), but in a few words - you cannot share predefined text via Facebook Share Widget:

iOS共享表的使用受Facebook平台政策的约束,其中包括第2.3节,其中规定,应用程序可能无法在共享表的上下文中进行预填充.这意味着应用程序可能不会使用应用程序用户未输入的内容来预填充共享表单的initialText字段.

Use of the iOS share sheet is subject to Facebook Platform Policy, including section 2.3 which states that apps may not pre-fill in the context of the share sheet. This means apps may not pre-fill the share sheet's initialText field with content that wasn't entered by the user of the app.

这篇关于仅在Facebook中分享文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆