oauth facebook api access token misses tagged photos - facebook

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.

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 graph api for photos my page is tagged in?

I have a Page. I am using the graph api (page-id/photos) to get all the photos my page is tagged in. I am the admin of the page. I am using the access token with all the permissions including manage_pages. But the only photo that is returned in json is the page profile picture. Can Some One help me to receive all the photos my page is tagged in?
https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=%257Bpage-id%257D%2Fphotos&version=v2.2
Thanks
Finally solved the Issue. https://developers.facebook.com/docs/graph-api/reference/v2.2/page/photos
The document reference is not clear. The end point is page-id/photos/tagged.
Steps
get access token of the person with manage_pages permissions
get access token of the page using me/accounts endpoint/
get all tagged pictures using page-id/photos/tagged endpoint

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

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.

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.