I am developing an app using the facebook graph api.
When I create an album with more than three pictures on facebook, on my wall post it displays three thumbnail images, but when I check in the feeds in the graph api, it only gives link to one image.
I checked out similar websites, and they also display three images like facebook not sure how to do this.
I think you are supposed to get the photos uploaded in a particular album,for that you can use
https://graph.facebook.com/facebook_d/albums
this will return all album details with album_id,using that album id you can fetch the photos in that album by
https://graph.facebook.com/album_id/photos.
Related
I used to run a web page that would take all my own photos from Facebook and display them in categories.
Now that Facebook has removed user_photos and user_videos from the login, it won't anymore work.
Is there anyway to get my own photos and videos without submitting the app to the AppReview? I only need access to my own photos, not others'.
Best,
I am uploading some photos by Graph API and I want to make my application album private by default so that it won't spam the news feed of other users. Or maybe there is an option for it to not post every upload on news feed?
Yes, you have privacy parameter. I haven't tested it with photos yet but it works fine with albums and posts. Pass the privacy object along with access_token or other fields.
http://developers.facebook.com/docs/reference/api/post/
See the privacy field in above link.
To upload photos without the corresponding news feed story, there's a no_story parameter you can include when uploading the photo
This is documented in the 'photos' part of the 'User' Graph API documentation
All available descriptions to upload an image to a fanpage use an album id, but
no one describes the format of the id and how to get it.
Are there examples of php code to get the album id of an album on a fanpage
and examples to upload an image to that page
Here are the steps you will need to build, using the graph api.
Get the facebook ID for the page.
Get an access_token from the page you want to upload to.
Make a form to POST to "https://graph.facebook.com/". $_userID . "/photos?access_token=". $_accessToken
The image will be uploaded to a folder with the same name as you app. So if your app is called "Magic Photo Uploader", the photos will go into a folder called "Magic Photo Uploader Photos"
In my experience you will not need an album ID, I think that documentation is outdated, since for all my apps it makes a album for those app photos and I cannot rename it. But there was once upon a facebook, a REST API that used to let you create and populate albums. Not sure if that is still accessible as a legacy.
How do I get user's profile photo URL upon connecting to my App? Not a big photo, but some sort of profile picture which would display only face photo of the user. (like the one is displayed next to the comment entry in Facebook comments)
Once connected to your app, all you need is to grab their user id. You can get this by calling https://graph.facebook.com/me (or parsing the access_token Facebook gave you). To get the users friends photos, you will want to access /me/friends and grab the id's. The image you are most likely looking for is this one, as it is their face and always a small squre:
https://graph.facebook.com/4/picture?type=square
The other images will all be variable sizes across users:
https://graph.facebook.com/4/picture?type=small
https://graph.facebook.com/4/picture?type=normal
https://graph.facebook.com/4/picture?type=large
Have you tried https://graph.facebook.com/[PROFILE_ID]/picture?
Check out doc here https://developers.facebook.com/docs/reference/api/
Is it possible to request all the videos associated with a face book account? So I can loop through and echo them to the page. Sort of like getting the json data of an album that has all the images within this album. I have been using [Facebook Graph API for Video][1]
[1]: http://developers.facebook.com/docs/reference/api/video/ as a reference.
I have it working for the albums and images so when a photo is added to face book it updates the website. Now I want to do the same thing for the videos.
Any ideas would be great.
Thanks!
It does not appear the Graph API offers access to a list of videos. You would need to use FQL
https://developers.facebook.com/docs/reference/fql/
And query the video table
https://developers.facebook.com/docs/reference/fql/video/
For videos owned by a user. Note you'd have to keep track of the last time you queried and limit your query only for videos with a created_time after the last time you checked.