douzhangbao2187
2015-09-18 15:11
浏览 44
已采纳

FB API(PHP) - 如何获取照片URL

When I try to get photo data by this request

$response = $fb->get('/me/albums');
$albums = $response->getDecodedBody();

foreach($albums['data'] as $album)
{
    echo 'Album: '. $album['name'] .'<br/>';

    $response = $fb->get('/'. $album['id'] .'/photos');
    $photos = $response->getDecodedBody();

    foreach($photos['data'] as $photo)
    {
        $response = $fb->get('/'. $photo['id']);
        $data = $response->getDecodedBody();

        var_dump($data);
    }
}

I get only [ created_time, id ] of each photo. Is some privilege required to get this content?

Do I need to "user_photos" privilege accepted? I thought that admin may test it without acceptation.

1条回答 默认 最新

相关推荐 更多相似问题