We are trying out Parse server
, and we have never used Parse SDK before.
As part of learning we tried Facebook login with Parse
, that worked good. Next we wanted to save the retrieved user information and we are stuck at saving the Profile picture
.
The Code
let pictureURL = "https://graph.facebook.com/\(facebookID)/picture?type=large&return_ssl_resources=1"
let imageData = NSData.init(contentsOf: NSURL(string: pictureURL) as! URL)
let picture = PFFile(data: imageData! as Data)
PFUser.current()?.setObject(picture, forKey: "profilePicture")
PFUser.current()?.saveInBackground()
And it crashes on the line setObject
with the following log:
Any help is much appreciated to get this issue resolved. Thanks!