Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "graph.facebook.com";
- $groupid = "";
- $token = "";
- $postid = "";
- $type = "/v2.8/".$groupid."_".$postid."/comments";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,"https://".$host.$type);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,"message=👆&access_token=".$token);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $server_output = curl_exec ($ch);
- curl_close ($ch);
- $a = json_decode($server_output);
- $o = $a->id;
- echo $o;
- sleep(2);
- $type_delete = "/v2.8/".$o;
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,"https://".$host.$type_delete);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
- curl_setopt($ch, CURLOPT_POSTFIELDS,"access_token=".$token);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $server_output = curl_exec ($ch);
- curl_close ($ch);
- $a = json_decode($server_output);
- print_r($a);
- // Keterangan:
- // - Untuk $groupid silahkan diganti sesuai dengan ID Group Facebook
- // - $token diganti dengan token kamu. Di wajibkan untuk menggunakan token permanen seperti HTC Sense.
- // - Untuk $postid silahkan isi dengan ID Postingan yang akan di sundul
- ?>
Advertisement
Add Comment
Please, Sign In to add comment