I\'m trying to get information through the facebook sdk but so far I\'m getting only the id and the name of the user, although I\'m sure there is an email available, as it i
I struggled with this problem for almost a day until finding the answer by @HeTzi, which worked perfectly. The swift version of such a request is:
func referenceFBData() {
var request = FBSDKGraphRequest(graphPath:"me", parameters: ["fields":"email,first_name,gender"]);
request.startWithCompletionHandler { (connection : FBSDKGraphRequestConnection!, result : AnyObject!, error : NSError!) -> Void in
if error == nil {
println("The information requested is : \(result)")
} else {
println("Error getting information \(error)");
}
}
}
Remember that you must first request the proper read permissions to obtain data using this request.