Umgang mit Facebook Graph API führen iOS-SDK mit Swift

Ich möchte nur Daten anfordern, die von Facebook 's Graph API, z.B. Holen Sie sich die aktuellen user' s basic info.

Den Objective-C doc: https://developers.facebook.com/docs/ios/graph#userinfo

[FBRequestConnection startForMeWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
  if (!error) {

    /* My question: How do I read the contents of "result" in Swift? */

    //Success! Include your code to handle the results here
    NSLog(@"user info: %@", result);
  } else {
    //An error occurred, we need to handle the error
    //See: https://developers.facebook.com/docs/ios/errors   
  }
}];

Gibt es keine schnellen doc noch, und ich bin verwirrt über die "Ergebnis" - parameter, dessen Typ "id".

Schreibe einen Kommentar