Facebook graph api for photos my page is tagged in? - facebook

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

Related

How to get data regarding facebook page mentions via facebook graph api

I tried getting data using Graph API Explorer code below:
GET request:
page_id/tagged
But I'm getting only few posts. I created 2 new posts from 2 different users and tagged my page. I get mentioned notifications in my page, but it doesn't reflect in graph API.
Is there any other way to track page mentions or Am I doing it the wrong way? Also, I need the user id of the user who has tagged my page.
Could anyone point me in the right direction? I'm confused.
I was using user access token. I used Page access token, now I'm getting the data.

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.

Facebook graph api feed returning an empty array

I'm trying to make a facebook graph api call to get a public(i.e. OPEN) group's feed.
When I go to the group's site there's quite a large feed, but when I issue the API call, I get an empty array.
I tried using an access_token parameter received from the group's adminitrator, but I still got nothing.
Do I have to request some specific permissions to receive the feed?
Note that on some pages I can get all data without extra permissions - e.g. the cocacola page:
https://graph.facebook.com/cocacola/feed?#{ACCESS_TOKEN}
My end goal is to have a list of all recent feed activity for the group on a third-party page.
Page access tokens are diffirent from user access tokens. So if you had an administrator access token, you have to get a list of pages that admin owns. Then in that list you can find page specific acces tokens. After gathering page access_token you can make the API call. But also you have to get Page access permissions.
1) GET admin's pages array with access_tokens
https://graph.facebook.com/[ADMIN-FB-ID]/accounts?access_token=[ADMIN-ACC-TOK]
2) Then get the page access token from returning array
3) Finally you can call page's feed api.
Hope it helps,

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.