title: How can I create a 'share to Facebook button' in a SpriteKit game using swift?
body: <p>I have made a simple game using the Game template in Xcode, coded in swift. I created a shapeNode, and when it is touched, I would like this code to run:</p>
  
  <pre><code>        if SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook){
              var controller = SLComposeViewController(forServiceType: SLServiceTypeFacebook)
              controller.setInitialText("Testing Posting to Facebook")
              //self.presentViewController(controller, animated:true, completion:nil)
          }
  </code></pre>
  
  <p>This code is run in the GameViewController.swift file, but gives this error. This error occurs on the commented line. </p>
  
  <pre><code>Could not cast value of type 'UIView' (0x379480d0) to 'SKView' (0x37227ad0).
  </code></pre>