I am using the Graph API in my iOS app. When I do a request of type [facebook requestWithGraphPath:@"me/photos"] .. I do get the expected result (the 25 most recent Photo object). I can see in the results the comments, tags... for each photo but cannot see the likes for each photo开发者_JS百科. Is this something that anybody else experienced before or am I missing some permissions approval? Prior retrieving the photos, I do [facebook authorize:] with the following permissions : "user_photos", "friends_photos". It just seems to me that the likes property is missing from the returned objects...
Thanks for any help.
Getting likes is a separate graph API call. Also I wouldn't count on the comments in the photo call, this seems to be an undocumented feature.
The URL for like is: https://graph.facebook.com/{photo ID}/likes
And similarly for comments: https://graph.facebook.com/{photo ID}/comments
The Photo object documentation page is your friend here.
You could combine these calls using a batch request to get all of the photo ids then gets the likes and comments for each photo ID.
精彩评论