I'm having trouble to be able to post on my business page as page itself.
Right now I have:
<?php
require_once("facebook.php");
$config = array();
$config['appId'] = '446766585xxxxxx'; <-- APP ID
$config['secret'] = '6fc8646c63b5356b5264d73f0fxxxxxx'; <--- APP SECRET
$config['fileUpload'] = false; // optional
$fb = new Facebook($config);
$params = array(
"access_token" => "XXXXXX", <--- PAGE ACCESS TOKEN OR APP ACCESS TOKEN
"message" => "Hello",
"link" => "http://www.example.com",
"picture" => "http://example.com/images/8.jpg",
"name" => "Completed",
"caption" => "www.example.com",
"description" => "Description here."
);
try {
$ret = $fb->api('/113928402609xxxx/feed', 'POST', $params); <-- PAGE ID I HAVE HERE
echo 'Successfully posted to Facebook';
} catch(Exception $e) {
echo $e->getMessage();
}
?>
The issue is , if I change the access token to the access token of the App - I keep posting as a user and not as the page...
If I set the access token to be the Page access token with the necessary permissions(manage_pages, manage_accounts, user_events)
I get the error "Invalid appsecret_proof provided in the API argument "
What am I missing here?