I am new to Facebook API but I have to get all photos from a Facebook page. I managed to get a graph api query that returns all pictures of only the first ever created album on the page which is the profile picture album. For example:
https://graph.facebook.com/227843870675663/photos
But I need to do the same for all other existing albums in the page. Any pointers are really appreciated.
Select “Settings” and then choose “Your Facebook Information.” Next, select “Download your Information.” Make sure to deselect all checked categories. Now, select “Photos and Videos” and proceed to choose the date range, file format, and media quality. Tap on “Create File” and wait for Facebook to gather all the media.
Download Facebook Photos From the Facebook App Go to your profile page, and then scroll to the bottom and go to Settings & Privacy > Settings. Select Off-Facebook Activity on the next page, from the Security section, and then More Options > Download Your Information.
Call the Graph API - https://graph.facebook.com/me/accounts. You can test this procedure in the graph explorer -> Just click on 'Get Access Token' button-> under 'Extended permission' check 'manage_pages' & submit it. It will give you the admin-page-details JSON.
try this and let me know how it goes for you, I've successfully pulled all photos.
Ensure that you are an Admin of the Facebook Page.
go to : http://developers.facebook.com/tools/explorer
In the API Navigator, you can see "/me" will bring up the basic information of yourself.
Try typing in "/me/accounts" to see if you can see anything. It should give you an error.
Click on "Get Access Token"
a window will pop-up. Navigate to "Extended Permissions"
Select "manage_pages"
Click "Get Access Token"
Now try "/me/accounts" again. You should see a list of Pages inside the viewing window.
Select the Page you want, and click on the "id" field
Next, on the left window, you can see "Node: " and a + sign. Click on the + sign to see what are the options you have.
Click on the + sign and scroll down to "connections" and select "Albums"
The child-level, select "Photos"
The "Photos" child-level, select "source"
Now click "Submit" on the right hand side. You will see a JSON returned with the url of all the photos in your selected Facebook Page.
Copy the URL - https://graph.facebook.com/?fields=albums.fields(photos.fields(source)) and plug it into your browser. You should see a JSON of all your photos, and its corresponding url on Facebook's CDN.
When you get your Facebook user, you can:
They respectively need those permissions:
UPDATE:
If you want to get those information from a Facebook page:
Permissions are: any valid access_token or user access_token
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With