1

I am attempting to query the Photo table through FQL using this query:

SELECT owner FROM photo WHERE pid="XXXX"

For some reason, no matter what pid I choose, I get an empty set response:

Facebook responded with HTTP status code 200 and response body: []

I am using RestFB.

1 Answers1

1

Do you have permissions to access the users photos?

user_photos and/or friends_photos
Provides access to the photos the user has uploaded, and photos the user has been tagged in.

https://developers.facebook.com/docs/reference/api/permissions/#user_friends_perms


Graph FQL https://developers.facebook.com/docs/reference/fql/ with sample query.

ShawnDaGeek
  • 4,145
  • 1
  • 22
  • 39
  • 1
    There's no way I can access the user's public photos? – Suraj Kulkarni Nov 30 '11 at 19:18
  • No not through the Graph API, have to get permissions. – ShawnDaGeek Nov 30 '11 at 19:31
  • You can however access a fan page or applications public photos with out permission. – ShawnDaGeek Nov 30 '11 at 19:32
  • 1
    How would I do so? Can I use FQL, or would I have to use the Graph API? – Suraj Kulkarni Nov 30 '11 at 22:03
  • FQL has is being ported to the graph, let me edit in the links you need for the docs. both rely on the graph for requests and queries. – ShawnDaGeek Nov 30 '11 at 23:20
  • Thanks. Though the page_fan table doesn't have any links to photos. Am I supposed to use a REST endpoint instead? – Suraj Kulkarni Dec 01 '11 at 14:41
  • rest is being deprecated, i would not suggest that. for you i would suggest using Javascript SDK login button to get user_photos Permissions and FQL just the way you where going to do. – ShawnDaGeek Dec 01 '11 at 15:24
  • ** We are in the process of deprecating the REST API. If you are building a new Facebook application, please use the Graph API. While there is still functionality that we have not ported over yet, the Graph API is the center of Facebook Platform moving forward and where all new features will be found.** – ShawnDaGeek Dec 01 '11 at 15:25