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)
}
如果我尝试在模拟器上分享文字和图像,那就可以了。我收到了像这张图片的回复。
但是当我在我的设备上运行此应用程序时,它似乎不会预先填充设备中的文本。我的右侧只有图像。
有人有更好的解决方案吗?