Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. <?php
  2. // require Facebook PHP SDK
  3. // see: https://developers.facebook.com/docs/php/gettingstarted/
  4. require_once("facebook.php");
  5.  
  6. // initialize Facebook class using your own Facebook App credentials
  7. // see: https://developers.facebook.com/docs/php/gettingstarted/#install
  8. $config = array();
  9. $config['appId'] = '350685531728';
  10. $config['fileUpload'] = false; // optional
  11.  
  12. $fb = new Facebook($config);
  13.  
  14. $cnt = $_GET['cnt'] + 1;
  15. $ar = array("IDPOST 1",
  16. "ID POST 2");
  17.  
  18. $object = (object) $id;
  19.  
  20. $date = date('h:i:s', time());
  21.  
  22. // define your POST parameters (replace with your own values)
  23. $params = array(
  24. "access_token" => "", // see: https://developers.facebook.com/docs/facebook-login/access-tokens/
  25. "message" => $date,
  26. "attachment_url" => ""
  27. );
  28.  
  29. // post to Facebook
  30. // see: https://developers.facebook.com/docs/reference/php/facebook-api/
  31. try {
  32. $ret = $fb->api('/.'$ar[$cnt]'./comments', 'POST', $params);
  33. echo generateRandomString();
  34. } catch(Exception $e) {
  35. echo $e->getMessage();
  36. }
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement