I am trying to get our app approved for user_friends
permission from Facebook. They asked to implement the feature and demonstrate how the usage will be implemented.
Here is what I did in code:
fileprivate func getFBFriends() {
let params = ["fields": "id, first_name, last_name, name, email, picture, user_friends"]
let graphRequest = GraphRequest(graphPath: "/me/friends", parameters: params)
let connection = GraphRequestConnection()
connection.add(graphRequest, completion: { (connection, result, error) in
if error == nil {
if let userData = result as? [String:Any] {
print(userData)
}
} else {
print("Error Getting Friends");
}
self.dispatchGroup.leave()
})
connection.start()
}
I am using test users created in Facebook developer portal.
My app is in live mode. I tried switching from live to development as well.
I added test users as friends and logged into app using facebook for all the users.
Response from Facebook Graph API Explorer:
{
"data": [
],
"summary": {
"total_count": 3
}
}
PS: I have already checked if I have AccessToken
or not. The problem is, I get only the count but no friends. All posted answers for same question, didn’t solve my problem.
2
Answers
There are multiple bugs logged against this issue:
https://developers.facebook.com/support/bugs/712344266793255
https://developers.facebook.com/support/bugs/721152122632278
No progress has been reported by the Facebook team so far. I’d suggest that you also comment on the aforementioned pages to help Facebook prioritize the bug.
The issue seems to finally have been resolved. Check here for details: https://developers.facebook.com/support/bugs/334477245374676/?join_id=f3b4be2272df3a4