title: why does posting to facebook page yield "user hasn't authorized the application"
body: <p>I have read the fb docs and written code to publish a message to a facebook "page", however I am getting an error that I don't expect to see:</p>
  
  <pre><code>(#200) The user hasn't authorized the application to perform this action
  </code></pre>
  
  <p>Here's what I've done:</p>
  
  <ul>
  <li>I set up a facebook application, which provides my <code>APP_ID</code> and
  <code>APP_SECRET</code>.</li>
  <li>I set up a test facebook "page". Let us refer to its fb id as <code>PAGE_ID</code>.</li>
  <li>Used OAuth to get a <code>USER_ACCESS_TOKEN</code> with scope "publish_actions,manage_pages" for the user. I accepted the permissions requested by my app when redirected to the facebook auth page.</li>
  <li>I did a GET on <code>https://graph.facebook.com/me/accounts</code> using the <code>USER_ACCESS_TOKEN</code>, and I get back a list of pages I administrate, including the one I want to post to.</li>
  </ul>
  
  <p>This block of data for my page looks like:</p>
  
  <pre><code>{
    "data": [
      {
        "category": "Community", 
        "name": "My Generic Test Page", 
        "access_token": PAGE_ACCESS_TOKEN, 
        "id": PAGE_ID, 
        "perms": [
          "ADMINISTER", 
          "EDIT_PROFILE", 
          "CREATE_CONTENT", 
          "MODERATE_CONTENT", 
          "CREATE_ADS", 
          "BASIC_ADMIN"
        ]
      }, 
      ....
    ]
  }
  </code></pre>
  
  <p>Then I use the <code>PAGE_ACCESS_TOKEN</code> to post a message to the page:</p>
  
  <ul>
  <li>I did a POST on <code>https://graph.facebook.com/PAGE_ID/feed</code> with a field <code>message</code> equal to <code>This is a test post.</code></li>
  </ul>
  
  <p>Facebook returns:</p>
  
  <pre><code>{
    "error": {
      "message": "(#200) The user hasn't authorized the application to perform this action", 
      "type": "OAuthException", 
      "code": 200
    }
  }
  </code></pre>
  
  <p>Using the <a href="https://developers.facebook.com/tools/debug/access_token" rel="noreferrer">token debugger</a>, I can confirm that my <code>PAGE_ACCESS_TOKEN</code> is valid, and has scopes: <code>manage_pages</code> and <code>publish_actions</code>.</p>
  
  <p>Where am I missing authorizing the application? Do I need additional scopes? Did I miss clicking something on the facebook authorization screen? Is there a setting on the app I am missing? After days of debugging this, I must be blind to the problem. :-|</p>