title: Getting page access_token for a Facebook page (using Graph API)
body: <p>I am trying to access a public FB community page and display the images on web page, example-http://www.codeofaninja.com/2011/06/display-facebook-photos-to-your-website.html
  My site is being developed in java, so I am looking for a core java solution to do something like this.</p>
  
  <p>My site does not prompt for the user to login via Facebook or authenticate. I am simply trying to display all the images from my own album on my website.</p>
  
  <p>I have created an FB app, and then created a community page on which I have my pictures.</p>
  
  <p>I am struggling to I authenticate from the backend code of my with my app or page. My app has user_photos permission and the App Type (Apps->Your APP->Advanced->App type) is Web.</p>
  
  <p>Here are the things I tried using graph API:
  1) Get access token</p>
  
  <pre><code>https://graph.facebook.com/oauth/access_token?client_id=ABC&amp;client_secret=XYZ&amp;grant_type=client_credentials
  </code></pre>
  
  <p>2) Then use access token to get access to the page and its albums, but the above gives me app access_token. As mentioned on <a href="https://developers.facebook.com/docs/reference/api/page/#page_access_tokens" rel="nofollow">Graph API documentation for Page</a> it requires a page acess_token, but I am not understanding how do I get the page_access_token via an app access_token with a backend application.</p>
  
  <p>After Page access token is retrieved I can use the following call to retrieve all photos.</p>
  
  <pre><code>https://graph.facebook.com/PAGE_ID/photos?access_token=&lt;page_access_token&gt;
  </code></pre>