auto delete photo album facebook - fb

kali ini idmouse share script untuk 
mengahapus semua photo album unggah celluler dll :v
langsung aja seperti biasa buat file new deletealbum.php 
trus copy code di bawah ini 
trus pastein di file deletealbum.php ^_^
<?php
$token =  "acces tokenmu om ^_^"; 
$idalbum = "id albumnyan bos"; //isi id album

function hajar($yuerel, $dataAing=null) {
    $cuih = curl_init();
    curl_setopt($cuih, CURLOPT_URL, $yuerel);
    if($dataAing != null){
        curl_setopt($cuih, CURLOPT_POST, true);
        curl_setopt($cuih, CURLOPT_POSTFIELDS, $dataAing);
    }
    curl_setopt($cuih, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($cuih, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($cuih, CURLOPT_SSL_VERIFYPEER, false);
    $eks = curl_exec($cuih);
    curl_close($cuih);
    return $eks;
}

$menta = hajar("https://graph.facebook.com/".$idalbum."/photos?fields=id&limit=500&access_token=" . $token);
$jason = json_decode($menta);
foreach ($jason->data as $data) {

    hajar("https://graph.facebook.com/".$data->id."?method=delete&access_token=" . $token);
       echo "SUCCESS --> " . $data->id . "<br>";
}
?>


trus save aja jalankan dengan cron biar gk capek ;)
#thx to group kpk
#thx mbah ramadhani pratama
#thx dll
komen ya :v

0 Response to "auto delete photo album facebook - fb"

Posting Komentar