Tuan Anh Vu Tuan Anh Vu - 18 days ago 5
iOS Question

Facebook Graph API mutual friends images

I'm able to retrieve users' mutual friends using

context.fields(mutual_friends)
but I need to display images of the friends. However, I'm only getting back the friends id and name only. Is it possible to retrieve their images in the same call?

if((FBSDKAccessToken.current()) != nil){
FBSDKGraphRequest(graphPath: "/\(userID)", parameters: ["fields": "context.fields(mutual_friends)"]).start(completionHandler: { (connection, result, error) -> Void in
if (error == nil){

print("//////Mutual friends")
print(result!)

} else {
print(error!.localizedDescription)
}
})
}

Answer

You can get the image with using this API

https://graph.facebook.com/(friendFacebookId)/picture?type=large

For more info check this

Comments