一个PHP文件发布到我的页面

I have a script to post updates to our website to our facebook page as well. I created an API for this, got all the app_id's and such and added my facebook profile as both admin on the facebook page and added a manager role on the APP as well.

I read it wasn't necessary to get the APP reviewed by FaceBook if you're not publishing the app anywhere. This is not a website other people can use to post content, it's merely an admin tool to let us post our updates on our facebook page.

I post run my test post with this code (ID's removed):

$fb = new \Facebook\Facebook( [
  'app_id'                => APP_ID,    
  'app_secret'            => APP_SECRET,
  'default_graph_version' => 'v2.2',
  'default_access_token'  => DEFAULT_ACCESS_TOKEN
] );


$attachment = [
    'message' => 'this is a test message',
];

try{
    $result = $fb->post( '419661214806422/feed', $attachment );
} catch( Exception $e ){
    echo "<pre>" . print_r( $e, true ) . "</pre>";
}

This gives me an error message: (#200) Requires either publish_actions permission, or manage_pages and publish_pages as an admin with sufficient administrative permission. I don't know where to edit my permissions though. My account is the admin for the facebook page, and it has also been added as manager of the APP I'm writing. I tried searching on the web all afternoon, but I can only find information about APPs actually open to the public, which is something I don't need. I therefor can also not give a link to facebook for reviewing, since this is part of our admin.

Where are you getting your default access token from? You can debug your token here https://developers.facebook.com/tools/debug/accesstoken. It will tell you the permissions yuo have. During the auth flow, you would need to have granted those permissions to your app in order to post.