-1

I have the necessary permissions from facebook. I am using RESTFB, I see the methods getFullPicture and getPicture in Post.class but unable to make anything out of it. How to get all the photos from a post on a page in FB, using RESTFB in Java.

Abhijeet
  • 689
  • 2
  • 10
  • 19
  • please post the code you use for your call. It's to little information to guess what's the problem. – Norbert Feb 15 '19 at 08:20
  • Its simple, I want to know the procedure to get all pics from a public page on FB. So I am using getFullPicture but I am getting only one picture out of several pictures in a post. Even that is not HD. – Abhijeet Feb 15 '19 at 08:31
  • Okay, I see. Check the object_id field. If the picture is uploaded you can find it's facebook id there. Then make a request on that resource and fetch different versions with different resolutions. It should be a Photo type. About multi picture I'm rather unsure if this is possible, but you can check the type of this object id, too. Maybe this is some kind of album. Anyway, I would let Facebook provide the complete metadata of the object id and check the fields in the Graph API Explorer. – Norbert Feb 15 '19 at 08:50

1 Answers1

0

GetFullPicture and getpicture are not meant to give all images. To get the images from a post we have to get the post ID. Post id is the combination of pageId and one of the photo's which user has uploaded in that post, that photos id.

Example:242343423_2423423423. So the second part is a photo id. Take that photoId and query for its album. 2423423423?fields=album. will give the albumId. Get all photos from that album. JobDone!

Abhijeet
  • 689
  • 2
  • 10
  • 19