JnK13

auto sundul fb

Jan 18th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. <?php
  2. $host = "graph.facebook.com";
  3. $groupid = "";
  4. $token = "";
  5. $postid = "";
  6. $type = "/v2.8/".$groupid."_".$postid."/comments";
  7. $ch = curl_init();
  8. curl_setopt($ch, CURLOPT_URL,"https://".$host.$type);
  9. curl_setopt($ch, CURLOPT_POST, 1);
  10. curl_setopt($ch, CURLOPT_POSTFIELDS,"message=👆&access_token=".$token);
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  12. $server_output = curl_exec ($ch);
  13. curl_close ($ch);
  14. $a = json_decode($server_output);
  15. $o = $a->id;
  16. echo $o;
  17. sleep(2);
  18. $type_delete = "/v2.8/".$o;
  19. $ch = curl_init();
  20. curl_setopt($ch, CURLOPT_URL,"https://".$host.$type_delete);
  21. curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
  22. curl_setopt($ch, CURLOPT_POSTFIELDS,"access_token=".$token);
  23. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  24. $server_output = curl_exec ($ch);
  25. curl_close ($ch);
  26. $a = json_decode($server_output);
  27. print_r($a);
  28.  
  29.  
  30.  
  31. // Keterangan:
  32. // - Untuk $groupid silahkan diganti sesuai dengan ID Group Facebook
  33. // - $token diganti dengan token kamu. Di wajibkan untuk menggunakan token permanen seperti HTC Sense.
  34. // - Untuk $postid silahkan isi dengan ID Postingan yang akan di sundul
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment