ios 插件 com.apple.share.Facebook.post 不显示提供的文本

标签 ios xcode sharing uiactivityviewcontroller

在我的应用程序中,我使用以下代码允许与文本共享图像:

- (IBAction)sharePressed:(id)sender {
    UIImage *postingImage = [UIImage imageWithContentsOfFile:self.filepath];
    UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[@"Lorem ipsum", postingImage] applicationActivities:nil;
    [self presentViewController:activityViewController animated:YES completion:nil];
}

发布时我可以看到图像,但看不到文字。 FB中也不会出现文字。

最佳答案

恐怕告诉你,你不能以编程方式将文本发布到 Facebook。这是一项新的 Facebook 禁令,禁止“预先填写”的 Facebook 分享。这就是为什么较新版本的 iOS 不会显示您的文本的原因,即使正确提供它也很难(并且可以在 Twitter 和其他共享选项中使用)。

更多信息请引用 https://developers.facebook.com/docs/apps/review/prefill )

关于ios 插件 com.apple.share.Facebook.post 不显示提供的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29875123/

相关文章:

ios - 如何调试 "Windows were created before application initialzation completed."

ios - 全屏高斯模糊

iphone - UIWebView Controller 的问题

asp.net-mvc - 将 ASP.Net MVC 与 WebForms 结合起来

swift - UIActivityviewcontroller 中的文本不可编辑

flutter - 是否可以通过 flutter app 共享您的位置

ios - 在 Xcode 10 中构建时重置应用程序后 String.hashValue 不是唯一的

ios - iOS-5 中 UIButton 标题中带下划线的多行

ios - 将 Web 应用程序获取到应用程序商店

ios - 从 api 获取图像并在 UIImageView swift 中显示它们