Graph API - Profile (not page) - Album Image - Comments - facebook

I have a little problem with maybe the facebook permissions.
My client want's to import comments on his pictures in his public album (not from facebook page) to his website.
I did the whole thing except that facebook returns only my(the person who got access token using login with facebook) comments? In other words, it returns only comments that are made by the owner of the access token.
What I need is to get all the comments.
In Graph Explorer if I select:
"Application" => "Graph API Explorer" and i generate access token it returns all comments
In Graph Explorer if I select:
"Application" => "ExampleMyAppName" then it cannot fetch comments of other users, only comments of the owner of the access token.
I use "user_photos" in facebook login and in my application it's under review.
Is there any way to fetch all comments from all users on given photo?
Thank you

Related

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

check if user likes a page without application perm request

I have a simple tab page, php sdk working and I know I can get the "like" for this specific page from the user signed_request.
This page is a colaboration with another company who also has an FB page. What i´d like to know is if I can get the like status of their page for the current user so I can authorize an action on this tab that is dependant of the user liking both my page and my partner´s.
Is this possible without using an actual app, an access_token and the appropriate perms requested?
e.g. my page is fb.com/Coke and my partner is fb.com/Target
On this specific tab page I want to enable a button only if me (Coke) is liked (which I can get already) and if my partner (Target) is also liked.
I tried the graphAPI (me/likes) and FQL (using the connection table) and both compalin of an unauthorized request.
Short Answer:
No, this will not be possible in a production setting.
Further explanation:
Some users have their list of likes as public. In that case, it would work.
But in order to get likes from a user that has that setting as anything but public (such as myself, only friends of friends can see it), then it requires an app and an access_token that has a user_likes permission.
From the documentation:
Permissions Required:
user_likes permissions if querying the current user.

ID/albums/ doesn't return user IDs

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

Facebook API - post on page user 'likes'

using facebooks api... how do you post to a page a user likes on that users behalf... for example I have a user that likes a certain page. They can log into my app and make a post on that pages wall via my app instead of logging into facebook to do it.
If the user grants your app the publish_stream permission then you can post on his behalf on pages he likes (or pages that don't require to like in order to post).
You can try it yourself with the Graph API Explorer, just go there and click the Get Access Token button, then go to Extended Permissions tab, select "publish_stream" and confirm.
Then in the address field put a page you like, let's say southpark/feed and submit, you should see the feed of that page. Now, change the method to the left of the address field to POST and click the Add Field link and write in the name "message", enter a value and submit, you should get an id of the post as a result.