Integrate fb into Ios Swift

Asked

Viewed 200 times

0

Good afternoon people all good ? I wonder if by integrating fb sdk into my Ios Swift project I have access to his friends list ? And taking advantage of the question, would anyone have any tutorial on integration ? Thank you

1 answer

1


You can, provided that when you authenticate with Facebook you ask for permission user_friends to access the list of friends.

A request to get the list of friends is as follows:

let meRequest = FBSDKGraphRequest(graphPath: "me/friends", parameters: nil)
meRequest.startWithCompletionHandler({ (connection: FBSDKGraphRequestConnection!, result: AnyObject!, error: NSError!) -> Void in
   if (error != nil) {
       println(result) // Lista de amigos (paginada)
   } 
})

A great place to start with the integration with the Facebook SDK, is their own page: Facebook SDK for iOS - Getting Started

  • Hmmm ok thank you very much ... I will see

Browser other questions tagged

You are not signed in. Login or sign up in order to post.