Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // require Facebook PHP SDK
- // see: https://developers.facebook.com/docs/php/gettingstarted/
- require_once("facebook.php");
- // initialize Facebook class using your own Facebook App credentials
- // see: https://developers.facebook.com/docs/php/gettingstarted/#install
- $config = array();
- $config['appId'] = '350685531728';
- $config['fileUpload'] = false; // optional
- $fb = new Facebook($config);
- $cnt = $_GET['cnt'] + 1;
- $ar = array("IDPOST 1",
- "ID POST 2");
- $object = (object) $id;
- $date = date('h:i:s', time());
- // define your POST parameters (replace with your own values)
- $params = array(
- "access_token" => "", // see: https://developers.facebook.com/docs/facebook-login/access-tokens/
- "message" => $date,
- "attachment_url" => ""
- );
- // post to Facebook
- // see: https://developers.facebook.com/docs/reference/php/facebook-api/
- try {
- $ret = $fb->api('/.'$ar[$cnt]'./comments', 'POST', $params);
- echo generateRandomString();
- } catch(Exception $e) {
- echo $e->getMessage();
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement