title: Adapting Page Post Queries from Facebook API 2.5 -> 2.7
body: <p>I'm currently grabbing post-level insights from my FB page 2.5 for a dashboard to see how well recent posts are doing; a simple benchmark/performance manager dashboard that does all the querying on the front-end [js api].</p>
  
  <p>The calls/procedure I used to use:</p>
  
  <p>1) Get my posts  </p>
  
  <pre><code>[page_id]/posts
  </code></pre>
  
  <p>2) Then loop them and pull the post data from two synchronous calls</p>
  
  <pre><code>// A) gets all the metrics
  [page_post_id]/insights
  
  // B) gets other data critical for front-end display
  [page_post_id]/?fields=type,created_time,permalink_url
  </code></pre>
  
  <p>This works perfectly, and for as far as FB says, it will work until June 2018 (I think).</p>
  
  <p><strong>My problem is that the call for step 2-A fails because I believe it requires a separate call for each metric.</strong></p>
  
  <p>That 2-A call returns:</p>
  
  <pre><code>{
    "error": {
      "message": "Invalid query",
      "type": "OAuthException",
      "code": 3001,
      "error_subcode": 1504028,
      "is_transient": false,
      "error_user_title": "No Metric Specified",
      "error_user_msg": "No metric was specified to be fetched. Please specify one or more metrics to be fetched and try again.",
      "fbtrace_id": "XXXXXXXXX"
    }
  }
  </code></pre>
  
  <p><em>Am I wrong?</em>  </p>
  
  <p><strong><em>Is there something that could be done better or would I need to call each metric independently?</em></strong></p>
  
  <p>I'll eventually need to get there in 2 years but better to address it early and get my teeth on that fresh, new data.</p>
  
  <p>Thanks in advance everyone!</p>
  
  <p>Cheers!</p>