<?php
// require Facebook PHP SDK
// see: https://developers.facebook.com/docs/php/gettingstarted/
require_once("src/facebook.php");

// initialize Facebook class using your own Facebook App credentials
// see: https://developers.facebook.com/docs/php/gettingstarted/#install
$config = array();
$config['appId'] = '325152697924541';
$config['secret'] = 'e66ccf82a54c15ec9de3f6c8edb421bb';
$config['fileUpload'] = false; // optional

$fb = new Facebook($config);

// define your POST parameters (replace with your own values)

//san get token from here
//https://developers.facebook.com/tools/explorer/325152697924541?method=GET&path=444831642582043&version=v2.9
$params = array(
	"access_token" => "EAAEnuYMOu70BAN3tnbTkR8OH1EZCWmIQBTD7UC0aEZCFoZAlh953C5WZA5B2oFhrVtoulCUnBciZCY49hmbHQe8rfpmjoFTmZB3hIDSUi0Al7rdcD7xPOczvDeHTMJWBiSI6iWWSNI7ZC10bthbCPtmSxGO3ZCjYtcqSMgwpcrRBF2PJizjz7t84JFtYBflfSTcWbIHXOFjkoAZDZD", 
	// see: https://developers.facebook.com/docs/facebook-login/access-tokens/
	"message" => "testing for #facebook post #a1professionals",
	"link" => "",
	"picture" => "",
	"name" => "",
	"caption" => "",
	"description" => "."
);

// post to Facebook
// see: https://developers.facebook.com/docs/reference/php/facebook-api/
try {
	$ret = $fb->api('/ewebtester@yahoo.in/feed', 'POST', $params);
	echo 'Successfully posted to Facebook';
} catch(Exception $e) {
	echo $e->getMessage();
}
?>