从 Facebook 相册下载所有照片

Download all photos from Facebook album

我正在使用此代码...

它似乎有点工作,但问题是我得到的是照片缩略图而不是原始照片。

如何获取原始照片URL?

$albums = $fb->get('/me/albums', $token)->getGraphEdge()->asArray();

$photos = $fb->get("/{$album_id}/photos?fields=picture", $token)->getGraphEdge()->asArray();
foreach($photos as $photo){
$photo['picture'];
}

输出

https://fbcdn-photos-c-a.akamaihd.net/hphotos-ak-xpa1/v/t1.0-0/p130x130/xxxxxxxx_xxxxxxxxx_xxxxxxxx_n.jpg?oh=xxxxxxxxxxxx6&oe=56CA24CB&__gda__=xxxx_xxxxxxxxxxx

参考 herefields=picture returns link 到 100px 宽的照片表示。相反,你应该使用

字段=图像.

它 return 是 list<PlatformImageSource> 并且 PlatformImageSource 具有 this 结构。

source 元素应该 return 图片的 URI