无法使用SLComposeViewController在Device中将预先填充的文本发布到Facebook中

时间:2017-05-29 06:05:28

标签: ios swift facebook sharing slcomposeviewcontroller

if SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook)
 {
        let facebookSheet:SLComposeViewController = 
   SLComposeViewController(forServiceType: SLServiceTypeFacebook)

            facebookSheet.setInitialText("You can wash your cloths easy, join with Michigan Wash now !")
            let shareImageUrl = NSURL(string: "https:\/\/michiganwash.info\/uploads\/shareAssets\/logoimage.png")
            facebookSheet.addURL(shareImageUrl)

        }
        self.presentViewController(facebookSheet, animated: true, completion: nil)
    }

如果我尝试在模拟器上分享文字和图像,那就可以了。我收到了像这张图片的回复。

enter image description here 但是当我在我的设备上运行此应用程序时,它似乎不会预先填充设备中的文本。我的右侧只有图像。

有人有更好的解决方案吗?

0 个答案:

没有答案