getting high resolution photos that were posted on a page wall/feed

后端 未结 5 982
你的背包
你的背包 2020-12-15 09:58

I\'m getting my page wall with the open graph. And when someone posted a photo, I get it on the JSON

{
     \"id\": \"27888702146_10150369820322147\",
     \         


        
5条回答
  •  死守一世寂寞
    2020-12-15 10:23

    Though requesting a photo by its object_id will return an array of images with different dimensions, in some cases this approach would require an additional call to the Facebook API.

    A simpler approach is to add full_picture to your list of parameters, which will extract the highest resolution image associated with the post.

    /v2.2/6275848869/posts?fields=full_picture
    

    For example, if you want to extract all the posts from a Facebook page in the past X days, with the object_id approach you'd need to call the API 3 times:

    1. To get the page info.
    2. To extract the list of posts and obtain the object_id for each post.
    3. For each object_id, to retrieve the list of higher resolution images.

提交回复
热议问题