Getting all photos included in a single facebook f

2019-05-01 21:33发布

问题:

I'm using the Facebook graph API to get my recent posts and feed items with "graph.facebook.com/me/feed". The problem I am having is when a feed object is a post with multiple photos, the data in the results only contains info for one of the photos, and I cant seem to find a way to get the other photos included in the post.

Some details from the feed object:

"type": "photo" 
"status_type": "mobile_status_update"
"picture": "http://the_url_to_the_one_photo_it_does_return.jpg" 
"message": "The message/note attached with the photos for the post",
"id": "xxxxxxxx_xxxxxxxxxx" 
"object_id": "yyyyyyyyyyyyy"

I tried sending the "id" (post id) through a request (graph.facebook.com/xxxxxx_xxxxxxxxxxx), hoping it would give me the details of all the photos included in the post, but it does not. Also tried with "object_id" but it looks like that is just the id corresponding to the single included photo object.

I spent all day researching FQL. It is still new to me, but I seem to have grasped the basics, and it seems like if there is any hope of finding this, it would be to somehow pass the "id" from the post through an FQL query.

Does anyone know of a way to get details of all the photos included in a multi photo feed post? I'm ok with a dirty workaround with graph or fql if it's the only way. thanks! I'm working in iOS/Objective-C by the way.

回答1:

I have answered to this post containing info on how to do this without FQL since it is deprecated. Even though this is quite an old question I felt like giving an answer for people who might be looking for a solution like mine.