<?php
function borrarFoto($photoid,$token) {
$url = "https://graph.facebook.com/".$photoid."?access_token=".$token;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$result = json_decode($result);
curl_close($ch);
}
$lines = file("list.txt",FILE_IGNORE_NEW_LINES);
foreach($lines as $test){
borrarFoto($test, "ACCESS_TOKEN");
}