0

Hi my game has a post to Facebook button. I want the user to be able to post their highscore but not be able to change it but be able to type a message in with their post. How do i do this? the code i have so far is:

    @IBAction func ShareToFacebook(sender: AnyObject) {
    var SharetoFacebook: SLComposeViewController = SLComposeViewController(forServiceType: SLServiceTypeFacebook)
    var posting = finalTime.text
    SharetoFacebook.setInitialText("New Highscore ohhhhh yea :) \n \n " + posting!)
    SharetoFacebook.addImage(UIImage(named: "upload.png"))
    self.presentViewController(SharetoFacebook, animated: true, completion: nil)

basically I don't want them to be able to edit "posting"

  • 1
    You are not allowed to prefill the message at all – WizKid Jun 25 '16 at 22:10
  • 1
    Even if you could pre-fill, the only way you'll be able to enforce making part of the text read only is to get control before the result is posted to Facebook. That implies you need to intercept the action button, perhaps by subclassing the view, to get control from the Post button. – Feldur Jun 26 '16 at 16:48

0 Answers0