ID/albums/ doesn't return user IDs - facebook

I'm using Facebook Graph API to get the list of the public photo albums. I get my access token and everything works fine for me/albums but when I use another user's ID, it doesn't work. However I can access the user's photo albums using the photos link on my browser easily. I have both user_photos and friends_photos permissions in my app.
What am I doing wrong?
Update:
I have found several questions which had the same problem as mine. However their solution doesn't work for me:
Facebook Graph API returns false
Facebook graph API returns false for existing and public event

Related

How to get OTHER users' photos and albums with Facebook Graph API

Scenario: logged with my Facebook account and using a browser, I'm able to see some photos and albums of some users which aren't friends of mine (with a privacy setting of public or similar) and quite all their past profile photos.
For example the URL
https://www.facebook.com/<userid>/photos_all shows those photos.
I want to replicate behaviour with Graph API but GETting
https://graph.facebook.com/<userid>/photos?access_token=...
Gives me an empty data array.
Same scenario using tagged or albums instead of photos
I've tried to use site scraping but FB website uses AJAX to populate gridview of photos, so It's very difficult.
On Graph API Explorer I've requested and use an access token with all permissions and also a debug access token but I'm still unable to get other users' photos.
It's possibile to get photos of users which aren't in friend list with Facebook Graph API? Am I missing something?
For privacy reasons, it´s not possible to get the photos of OTHER users with the API. Even for the authorized user, you need the user_photos permission.
Scraping is not allowed btw: https://www.facebook.com/apps/site_scraping_tos_terms.php

Facebook Scopes for ALL photos in Graph API v2.0

This is more of a generic question: which combination of scope permissions and endpoints in V2.0 of the Graph API allows an app to access every photo that I either uploaded or that I was tagged in?
In other apps I've seen "this app will receive the following info: your public profile, friend list, email address, photos and videos and your friends' photos and videos."
I only know of user_photos and user_videos, which when I use only returns 60% of the photos that I see when I'm logged into my personal Facebook account.
In browsing these lists in graph explorer, it's not clear which permissions are responsible for "your friends' photos and videos.
Found this bug report on Facebook - https://developers.facebook.com/bugs/701749743226238/

Get likes of public photo on facebook

I'm trying to get photo data (like likes) using the graph api, but it appears that some photos give me the data, but others return "Unsupported get request".
I'm only testing public pictures, using GET /photo-id.
This photo, for example, returns "Unsupported get request", as you can see here.
Other photos do work, this one, for example.
Any ideas? Thanks a lot!
The difference is that one photo is created by a Page and the other one is created by a User. You can only get the User photos with a User Access Token, even if it´s a public one. For Page photos, you can use an App Access Token or a Page Access Token.
See those links for more information about Tokens:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/
Of course you also need to request the user_photos permission in the login process to get access to the User photos.
Btw, the user_photos permissions needs to get approved if you want to make it work for all Users. Without approval, it will only work for App Admins. See changelog and review guidelines:
https://developers.facebook.com/docs/apps/changelog
https://developers.facebook.com/docs/apps/review
Error 100 indicates a syntax error in the URL you are posting to. Are you using a custom graph URL set? If so, double check it.

Facebook SDK Get Friend's Photos

In the FB Graph Explorer, I run a graph for me/friends, returning the ids of all my friends. Then, I choose the id of a friend whom I know as photos visible to me in an album and run the request [friend's id]?fields=photos.
Almost all the time, none of the friend's photos' ids are returned in the explorer, even though I can plainly see them on through my FB account. All I get back is the friend's id. I have both the general user access token and friends_photos permissions selected. [friend's id]?fields=albums has the same result.
However, with a few certain friends, the request does return all of the photos the friend appears in.
What is making the difference and what must I do to gain access to my friends' photos through the SDK?
The correct query is [friend's id]/photos and [friend's id]/albums
Test with Graph API Explorer:
https://developers.facebook.com/tools/explorer?method=GET&path=FRIEND_ID%2Fphotos

oauth facebook api access token misses tagged photos

When I fetch tagged photos for a user I only get a certain set even after requesting the friend_photos_videos/user_photos/user_photos_videos tags and basically any other permissions list.
However doing a sample call from the fb oauth overview site gives me the entire list of tagged photos for myself with their generated access token...how is this possible?
Just wondering if anyone else has the same issue.