I'm trying to create a SKSpriteNode
with the texture of a profile picture from the facebook users friend. I have the right ID but its still returning nil.
My code:
let pictureData = NSData(contentsOfURL: NSURL(fileURLWithPath: "http://graph.facebook.com/\(friendObject["id"]!)/picture?type=large"))
picture.texture = SKTexture(image: UIImage(data: pictureData!)!)
This is the error I'm recieving:
fatal error: unexpectedly found nil while unwrapping an Optional value