I need to get user data from Facebook. I successfully receive data such as user name, id, photo, but when I try to query, for example, marital status, I get an empty dictionary in response.
I tried to do different requests, but everywhere I get this result. How can I fix this? My sample code is:
static func getUserRelationship() { if (FBSDKAccessToken.currentAccessToken() != nil) { guard let currentUser = getCurrentFacebookUser() else { return } FBSDKGraphRequest(graphPath: "/\(currentUser.id)/family", parameters: nil, HTTPMethod: "GET").startWithCompletionHandler({ (requestConnection, result, error) in if error == nil { let dictionary = result as! [String : AnyObject] let array = dictionary["data"] print("facebook", result, dictionary, array?.count) } else { print(error.localizedDescription) } }) } else { getDataLogin({ getUserBirthday() }, fails: { (error) in }) } } I bring the result to the console
facebook { data = ( ); }