<?php
$token = "**********";
$postID = "******";
$jumlah = 50;
$message = "HOMO";
for($a=0; $a<$jumlah; $a++){
$gay = curl("https://graph.facebook.com/".$postID."/comments?access_token=".$token."&method=post&message=".$message);
$dec = json_decode($gay);
if(isset($dec->id))echo "sukses\n";
else echo "error\n";
}
function curl($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$exec = curl_exec($ch);
curl_close($ch);
return $exec;
}
?>
Comments