Using the Facebook iOS SDK, how can I get an NSArray of all my friends and send them an invitation to my app? I am specifically looking for the graph path to ge
Here is a Swift Version.
var friendsRequest : FBRequest = FBRequest.requestForMyFriends()
friendsRequest.startWithCompletionHandler{(connection:FBRequestConnection!, result:AnyObject!, error:NSError!) -> Void in
let resultdict = result as NSDictionary
let friends : NSArray = resultdict.objectForKey("data") as NSArray
println("Found: \(friends.count) friends")
for friend in friends {
let id = friend.objectForKey("id") as String
println("I have a friend named \(friend.name) with id " + id)
}
}