AtomMota

komen kat latest post dan komen

Jun 17th, 2021
932
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $access_token =
  3.     "EAAIisKiH...";
  4.  
  5. $link = "https://graph.facebook.com/me/feed?access_token=" . $access_token;
  6. //      $jawi = file_get_contents($url);
  7.  
  8. $feed = file_get_contents($link);
  9.  
  10. $data = json_decode($feed, true);
  11.  
  12. $id_latest_post = $data["data"][0]["id"];
  13.  
  14. $komen_baru =
  15.     "https://graph.facebook.com/" .
  16.     $id_latest_post .
  17.     "/comments?access_token=" .
  18.     $access_token;
  19.  
  20. $dapat_komen_baru = file_get_contents($komen_baru);
  21. $id_komen_baru = json_decode($dapat_komen_baru, true);
  22. $dapat_id_komen_baru = $id_komen_baru["data"][0]["id"];
  23.  
  24. $ayat = $_GET["ayat"];
  25.  
  26. $kerja =
  27.     "https://graph.facebook.com/" .
  28.     $dapat_id_komen_baru .
  29.     "/comments?parents&message=" .
  30.     $ayat .
  31.     "&method=post&access_token=" .
  32.     $access_token;
  33.    
  34.    
  35. $hantar = file_get_contents($kerja);
  36.  
  37. print_r($hantar);
  38.  
  39. // https://graph.facebook.com/me/727115214590544_842263419742389/comments?parents&message=haha&access_token=
  40.  
  41. ?>
  42.  
  43.  
RAW Paste Data