title: Getting invalid oauth access token: where is the token I need?
body: <p>I would like help obtaining/locating the correct access_token value for an API call.</p>
  
  <p>I'm configuring an application that wants to search Facebook using the graph-api search request at <a href="https://graph.facebook.com/fql" rel="noreferrer">https://graph.facebook.com/fql</a>, for which I need an access_token. The application is a backend server so there's no UI and no users.</p>
  
  <p>I registered a new 'app' using the developer pages 'Create a New App' link, so I now have an app at: <a href="https://developers.facebook.com/apps/" rel="noreferrer">https://developers.facebook.com/apps/</a>&lt;> and from that I get an 'app secret' token. Digging into the Advanced settings page for the app there is also a Client token.</p>
  
  <p>However using either token results in the following JSON error:</p>
  
  <blockquote>
    <p>{"error":{"message":"Invalid OAuth access token.","type":"OAuthException","code":190}}</p>
  </blockquote>
  
  <p>Can anyone point me to where I've gone wrong?</p>
  
  <p>== </p>
  
  <p>The following 'curl' request demonstrates the command working correctly, but it's only usable token-less like this occasionally, so the app needs &amp;access_token=...stuff... adding to the parameters.</p>
  
  <blockquote>
    <p>$ curl '<a href="https://graph.facebook.com/fql?q=select%20url,%20share_count,%20like_count,%20comment_count,%20click_count,%20total_count%20from%20link_stat%20where%20url%20=%20" rel="noreferrer">https://graph.facebook.com/fql?q=select%20url,%20share_count,%20like_count,%20comment_count,%20click_count,%20total_count%20from%20link_stat%20where%20url%20=%20</a>"http%253A%252F%252Felifesciences.org%252Fcontent%252F2%252Fe01233"'</p>
    
    <p>{"data":[{"url":"http\u00253A\u00252F\u00252Felifesciences.org\u00252Fcontent\u00252F2\u00252Fe01233","share_count":0,"like_count":0,"comment_count":0,"click_count":0,"total_count":0}]}</p>
  </blockquote>