How to get larger version of Facebook's thumbnail images?

前端 未结 2 741
长发绾君心
长发绾君心 2020-12-21 05:34

Right now the Facebook API is returning a URL like this with all post/album images 130x130 pixels in size:

https://fbcdn-sphotos-h-a.akamaihd.net/hpho

2条回答
  •  一个人的身影
    2020-12-21 05:50

    https://graph.facebook.com/{object_id}/picture?type={thumbnail|album|normal}
    

    Example (using a bogus object_id of 122233334444555):

    https://graph.facebook.com/122233334444555/picture?picture?type=large
    

    Make sure object_id is not just the id of an item but it's object_id (which is typically the number following the underscore in the full id).

    I got those type values from a helpful facebook response message that said:

    "message": "(#100) type must be one of the following values: thumbnail, album, normal"
    

    In place of ?type=... you could do height/width as well:

    ?width=543&height=543
    

提交回复
热议问题