Is it possible to show images made with a facebook app (which are uploaded by them to the users facebook gallery) inside another website?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can retrieve images for the current user which she has uploaded with another app. The current user needs to be logged in with access token and you need
permissions.
You can retrieve urls to the photos with an FQL query and some client-side parsing:
First, query the FQL stream table for stream post attachments where the field “app_id” = the other app’s id.
This retrieves attachments for all posts done using the other app.
It’s possible the query can be further narrowed down as follows, but I don’t have a data set to test it on:
where 247 means photos. It could save you some work client-side (The two AND look hackish, perhaps someone can suggest a better statement…).
Once you have your response, parse the JSON. Each ‘attachment’ has a field called “media” which is an array. For each array item, check if type=”photo”. If it is, the “src” field will contain a url link to a small version of the uploaded photo.
To illustrate, here is the beginning of a sample JSON response:
The JSON response also contains links to other sizes.
For more information about the stream table please see the Facebook Developers docs.