0

I have a fan page on facebook, and I want to make an app that will display every image I post from the page.

I want to make that, and not make the user login with facebook in order to see them.

Is this possible? I've read that I need an access token, https://developers.facebook.com/docs/facebook-login/access-tokens.

Thanks.

Boldijar Paul
  • 5,405
  • 9
  • 46
  • 94
  • Use a page access token for that page to get all image posts – WizKid Apr 01 '15 at 18:41
  • Can you provide me some links? Are you talking about http://stackoverflow.com/questions/18559345/news-feed-from-facebook-wall-to-a-android-app ? – Boldijar Paul Apr 01 '15 at 18:48
  • First hit on Google is https://developers.facebook.com/docs/facebook-login/access-tokens which explains it very very well – WizKid Apr 01 '15 at 18:54
  • Its says 'you need to start by obtaining a user access token and asking for the manage_pages permission' The thing is that i don't want to ask the user to login with facebook... – Boldijar Paul Apr 01 '15 at 18:57
  • You ask your self to login. You get your user access token. You upgrade it to a page access token. You then use that for everything – WizKid Apr 01 '15 at 20:20

1 Answers1

1

To get the images from a Facebook page using the Graph API you will need to do the following steps.

  1. Authenticate you application with the 'manage_pages' permission. https://developers.facebook.com/docs/facebook-login/permissions/v2.3#reference-manage_pages

  2. Once you get a user access token for your application with this permission make the call Graph API call /me/accounts and retrieve the Page Access Token for your page.

Once you have the page access token you can use the Graph API as you are that specific page.

The following is a breakdown of all the edges you can use with your page access to https://developers.facebook.com/docs/graph-api/reference/page

In your instance you will most likely want to be using the {page-id}/photos endpoint with this access token which will allow you to retrieve photos from your page.

tehspark
  • 128
  • 6