Save Facebook profile data

let graphRequest : FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me fields=id,name,email,picture.height(300).width(300)", parameters: nil) graphRequest.startWithCompletionHandler({ (connection, result, error) -> Void in if ((error) != nil) { println("Error: \(error)") } else { let urlPath = result as! NSDictionary var Anidado:NSDictionary var AnidadoData:NSDictionary println("Facebook") println(urlPath["email"]!) println(urlPath["name"]!) Anidado = urlPath["picture"]! as! NSDictionary AnidadoData = Anidado["data"]! as! NSDictionary println(AnidadoData["url"]!) UrlFotoPerfil = AnidadoData["url"]! as! NSString NameUser = urlPath["name"]! as! NSString MailUser = urlPath["email"]! as! NSString } })
After of login with facebook.

SDK v.4.4

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.