在Facebook Wall发布,作为页面 - 给出错误

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?

First of all, publish_pages is needed to post as page, and there is no manage_accounts permission. Always refer to the API reference to find out which permissions you need. It´s not a guessing game, the reference will tell you exactly what to do.

About that error, you may have activated appsecret_proof in the App settings: https://developers.facebook.com/apps/[your-app-id]/settings/advanced/ ("Require App Secret")

You can either deactivate it, or you can transmit an appsecret_proof parameter to your API calls. More information: https://developers.facebook.com/docs/graph-api/securing-requests#appsecret_proof