user3255746 user3255746 - 5 months ago 68
iOS Question

Facebook SDK in Swift

I am trying to integrate Facebook login and more into my app but am having a lot of difficulty because there is not much documentation in Swift. I am trying to use this code:

FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
parameters:@{ @"fields": @"id,name,friends,birthday,gender,first_name,last_name,friendlists,picture",}
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
// Insert your code here

Any idea what this would be in Swift?

 FBSDKGraphRequest(graphPath: "me",
   parameters: ["fields": "id, name, first_name, last_name, picture.type(large), email, gender"])
    .startWithCompletionHandler({ (connection, result, error) -> Void in