1

my question is this, how do I get to post from spritekit to facebook? I have set up the game in my apps and loaded the frameworks, but I don't seem to find the documentation for swift, any help? Thanks.

It would come from here:

override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {

        //let nodeTouched = touches.
        var touch: UITouch = (touches.first as? UITouch)!

        var location = touch.locationInNode(self)

        var node = self.nodeAtPoint(location)

        println("\(node.name)")



        if node.name != "PTFB" {



            let gameScene = GameScene(size: size)

            let transition = SKTransition.doorsOpenHorizontalWithDuration(0.3)

            view?.presentScene(gameScene, transition: transition)

        } else {


            println("we are cooking")
            //here in the GameDone scene PFTB is the node that says post to fb
            var dict = NSMutableDictionary()


        }


    }

Xcode 6.3.2 Info.plist

Pedro.Alonso
  • 1,007
  • 3
  • 20
  • 41

1 Answers1

1

I have used this simple youtube tutorial to do stuff like you're asking. You are however going to have to tweak it to what you want to upload to facebook. But heres the link to the video: here

sorry I would comment but i dont have enough rep haha

  • hi nice tuto but I have tried and since I don't have view controllers only sknodes I haven not been able – Pedro.Alonso May 29 '15 at 12:09
  • 1
    I'm at work trying to get this site finished by five lol. I think though that the answer to this stack question may help you. http://stackoverflow.com/questions/25595601/swift-spritekit-facebook-share-button – Jeremy Evans May 29 '15 at 14:57