-1
所以我試圖從Facebook獲取朋友列表,但每次它崩潰。這是我的代碼...Swift 3:Facebook獲取朋友列表
FBSDKGraphRequest(graphPath: "/me", parameters: ["fields": "id, name, friends"]).start { (connection, result, error) in
if error != nil{
print(error!)
return
}
let Result: [String: String] = result as! [String : String]
// setting name //
self.NameField.text = Result["name"]!
print(Result["friends"]!)
}