我的问题是,如何从 spritekit 发帖到 facebook?我已经在我的应用程序中设置了游戏并加载了框架,但我似乎没有找到 swift 的文档,有什么帮助吗?谢谢。
它会来自这里:
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()
}
}
最佳答案
我已经使用这个简单的 youtube 教程来完成您所要求的事情。然而,您将不得不将其调整为您想要上传到 Facebook 的内容。但这是视频的链接:here
对不起,我会评论,但我没有足够的代表哈哈
关于ios - 我想使用 swift 从游戏中将我在游戏中获得的分数发布到 Facebook,一切都在 Obj-C 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30506118/