0
我必須通過ID獲取照片並設置此照片的寬度和高度。Facebook - 按照ID獲取照片並設置寬度和高度
我試過:
$photo_thumb = file_get_contents('https://graph.facebook.com/'.$attachments[$i]['target']['id'].'/picture?width=400&height=200&redirect=false&access_token='.$token);
$photo_thumb = json_decode($photo_thumb, true);
,最後我得到這個:
array(1) {
["data"]=>
array(2) {
["is_silhouette"]=>
bool(false)
["url"]=>
string(110) "https://scontent.xx.fbcdn.net/hphotos-xtl1/t31.0-8/s720x720/12496360_127798700941215_6417691067208545145_o.jpg"
}
}
這回的照片是720×720,爲什麼?我設置了400 x 200.任何人都可以告訴我爲什麼它不起作用以及如何修復它?
謝謝。