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
Related
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
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/
I have an application that pulls in content from both Facebook and Instagram, but users frequently cross-post the same photo. Using the Facebook Graph API, I'm trying to find a way to determine if any given photo was posted via Instagram.
I'm confident that this data exists, but I don't know how to access it via the API. Looking at one of my own cross-posted photos, I know Facebook at least has the data:
Have a look at the similar questions
How to get Likes of Instagram photo posts in Facebook Graph API?
Posts from Instagram not showing up on Facebook Open Graph API
And the bug report at FB: https://developers.facebook.com/bugs/110563582419837/
You could query the "Instagram Photos" album with FQL:
select pid, images from photo where album_object_id in (select object_id from album where owner = me() and name='Instagram Photos')
There were two solutions.
We only were asking for user_photo and user_status permissions. If we had asked for read_stream, we could have looked at the /me/posts endpoint, which offers the application field. We might do this, but the permissions could be confusing for users since it also allows us to read their newsfeed. Ideally, there'd be a user_posts permission that just gave us access to everything the user posts, but nothing posted by their friends.
Every Instagram photo shared is put into the same Facebook album. So, we just check to see if a photo is put in that album and disregard it if they've also authenticated with Instagram in our application. It feels less reliable, but it works.
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.
is there a way to get an access_token to get a stranger account photos, albums and friends?
As i can see you can get (with the right access_token) all the information belonging to you and your friends using:
https://graph.facebook.com/[User_ID]/friends?access_token=[A_T]
https://graph.facebook.com/[User_ID]/albums?access_token=[A_T]
https://graph.facebook.com/[User_ID]/photos?access_token=[A_T]
what about the friends of your friends and perfectly stranger? Are they reachable in such a way?
I ask this because using the normal browser i can get the public photos of unfriend account, so i thought that can be a way to get that information through the API.
It is not possible, the facebook privacy is to tight to do such a thing.