我正在嘗試在我的測驗應用中實施Facebook共享。內容是應用程序商店鏈接和測驗得分。它在模擬器中正常工作,但在設備顯示不同,並沒有顯示我的描述。這裏是我的代碼無法在Facebook上添加標題和說明分享
func ShareFB() {
let fbVC = SLComposeViewController(forServiceType: SLServiceTypeFacebook)
fbVC?.setInitialText("Hey! I scored \(String(describing: UserDefaults.standard.string(forKey: "TOTAL_SCORE")!)) in Test. This is really interesting! You can also try.")
fbVC?.add(URL(string: "https://itunes.apple.com/us/app/test-app/i?ls=1&mt=8"))
fbVC?.add(UIImage(named: "AppIcon"))
present(fbVC!, animated: true) { _ in
}
}
這是從Facebook的錯誤。如果您在您的設備上安裝應用程序,則不會顯示任何類型的文本。 –
首先從設備中刪除應用程序,然後檢查 –
好的,但這不是正確的方法。 – Ramanan