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

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

Related

How to get my own Facebook user timeline using Graph API?

I would like to get all the posts and updates that are normally displayed in FB official application for MY account (this includes updates from my friends and liked pages).
I wasn't able to find any details how to get that, the only thing I've managed to get is my own posts.
Anyone got any experience with that using current Graph API verion (3.3)?
All the alternate FB clients (ex. Friendly) must be doing this somehow.
There is no way to get ANY data of users who did not authorized your App. Which means, there is no way to get posts of friends. You can only get your own friends, with the user_posts permission and the /me/posts endpoint. If some Apps access friend data without their authorization, they are most likely doing something that is not allowed.
Here is what I found in their API docs:
There are two scopes:
The user feed requires the user's permission
The public feed has fewer capabilities but doesn't require perms

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/

Getting friend's wall post data via facebook API

I have never used facebook API.As part of my research project, I need to get activity data (the posts made, the links shared etc.) of a user's friends. Is it possible to get this data via facebook API? Do i need permission from user only or i need permission from user's friends too for accessing that data? I am assuming that since a user can see wall posts of his friends when he visits his friend's facebook profile, the same thing is possible using the API too.

Using single access token to get the 'likes' of other users

Using the normal Facebook website, one can get to a page showing which pages a user has 'liked'.
From the graph API, it is possible to get this for pretty much all pages, using graph.facebook.com/userid/likes?access_token=MYACCESSTOKEN.
However, I need to be able to do the same - i.e. get the list of pages a user has 'liked' for normal Facebook users (and not 'pages' who have 'liked' other pages).
Is this possible with the single access token? Judging by the fact you can get this info from the normal Facebook web page, I would expect it to be possible.
Privacy works slightly differently for applications accessing the API and for users accessing the actual site.
An application doesn't have access (by default) to your friends' likes to prevent data mining. In order to get a users friend's likes, you'll need to request the friends_likes permission.
You can read about this permission and others in the documentation.

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.