title: Fetch Own Feed From Facebook API
body: <p>I know this question has been asked a lot, but with the latest changes to Facebook I'm having a hard time figuring out how to accomplish this task.  Many tutorials and answers are no longer relevant due to these changes.</p>
  
  <p>What I want to do is fetch my own personal Facebook feed posts (my posts) and display them on a "News" section on my website.  I want to use the Graph API as the <a href="https://developers.facebook.com/docs/plugins/page-plugin/" rel="nofollow noreferrer">Facebook Page social plugins</a> have strange width restrictions that do not work for me.</p>
  
  <p>To access my OWN posts on my OWN feed to place on my OWN website, I seem to be having a hard time getting a working access token.  Do I need to do a "Facebook Login" for permission handling?</p>
  
  <p>I've created a Facebook Developer account, created an App and seem to be successfully fetching a token with the following code:</p>
  
  <pre><code>let myToken = ''
  
  fetch(`https://graph.facebook.com/oauth/access_token?client_id=${id}&amp;client_secret=${secret}&amp;grant_type=client_credentials`)
    .then(response =&gt; response.json())
    .then(token =&gt; (myToken = token.access_token))
    .catch(e =&gt; console.log(e))
  </code></pre>
  
  <p>When I go to use that token:</p>
  
  <pre><code>fetch(`https://graph.facebook.com/v3.0/me/feed?limit=10&amp;fields=id%2Cfull_picture%2Ccreated_time%2Cfrom%7Bid%2Cname%2Cpicture%7D%2Cmessage%2Clink%2Ctype%2Cshares%2Cobject_id%2Cstory&amp;access_token=${myToken}`)
    .then(response =&gt; response.json())
    .then(data =&gt; console.log(data))
    .catch(e =&gt; console.log(e))
  </code></pre>
  
  <p>I'm getting an error:  <strong>An active access token must be used to query information about the current user.</strong></p>
  
  <p>I don't want any user interaction (commenting, "likes", etc), all I simply want is to read the message and load an image if one is present.  I'll refer the visitor to a 
  "View On Facebook" link for the interaction.  </p>
  
  <p>Using the Graph API Explorer Tool, I am able to successfully get data but I need to choose "Get User Access Token" and select a bunch of permissions.</p>
  
  <p>I can take the token from Graph API Explorer and get my desired code working but it only lasts 1 hour (short lived) to 2 months (long lived). And would rather not continually update a hard-coded token into my page.</p>
  
  <p>Am I missing something here?</p>
  
  <p>Thanks in advance.</p>