我可以很好地检索相册的照片列表,是的,在返回的照片数组中有不同的尺寸,我的问题是:有没有办法指定要返回的图像的尺寸。
从/ photos call
返回的数组[id] => COVER PHOTO ID
[from] => Array(
[name] => FB_USER NAME
[id] => FB_USER ID
)
[name] => PHOTO NAME
[picture] => https://photos-b.xx.fbcdn.net/hphotos-ash4/xxxxxxxxxxxx_s.jpg
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/s720x720/xxxxxxxxxxxx_n.jpg
[height] => 540
[width] => 720
[images] => Array(
[0] => Array(
[height] => 1224
[width] => 1632
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/xxxxxxxxxxxx_o.jpg
)
[1] => Array(
[height] => 720
[width] => 960
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/xxxxxxxxxxxx_n.jpg
)
[2] => Array(
[height] => 540
[width] => 720
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/s720x720/xxxxxxxxxxxx_n.jpg
)
[3] => Array(
[height] => 450
[width] => 600
[source] => https://sphotos-b.xx.fbcdn.net/hphotos-ash4/s600x600/xxxxxxxxxxxx_n.jpg
)
... other sizes
[link] => ALBUM LINK
[icon] => https://fbstatic-a.akamaihd.net/rsrc.php/v2/yz/r/StEh3RhPvjk.gif
[created_time] => 2012-10-14T03:52:17+0000
[updated_time] => 2012-10-14T03:52:17+0000
)
有没有办法使用相册的封面照片ID和图片/图片api来调整大小?
https://developers.facebook.com/docs/reference/api/using-pictures/
请注意你可以做什么?width = xxxx& height = xxxx
答案 0 :(得分:1)
你不能。
如this doc所示,您只能调整图片的大小,而不是照片。
因此,您必须自己调整这些照片的大小。至少,您可以为照片选择尺寸。