Good Afternoon,
Is there an api method/loop which will allow me to access all of a users photos? Keep in mind I do not want tags or albums, I want all pictures. Appreciate the help.
I have tried api photos method yet it does not do what I wish.
Make sure you got the user_photos permission and make a request with graphpath me/photos. You are gonna get all photos he uploaded and is tagged in. Although these are easily removed by just checking who uploaded the image (this is included in the response JSON).
Related
I'm trying to find all photos where the current user is tagged in using the Facebook PHP SDK. When I query $fb->get('/me/photos?type=tagged&limit=10000'), only around 500 photos are present in the list when I'm logged in as me. If I check on the Facebook web page, it says there are over 3000 photos of me. Is it possible to get all photos of the current user?
Hopefully this summary saves some folks time since I spent a few days scratching my head over this. As of Graph API v2.5, your app will not have permission to view photos that other people have uploaded unless the uploader has logged into the app and granted the user_photos permission too. This even applies to photos the current user has been tagged in.
In order for an app to get all photos that you are tagged in through the Graph API, all of your friends who have uploaded photos that you are tagged in would have to grant permission to the app.
To quote Facebook support:
After checking, this should be the case. Each Facebook user is in
control of what data is accessible to an application. If you have that
user grant the user_photos (and possibly user_posts if it's the
container for the photo) to the application, you should be able to
fetch that photo.
Source: Facebook API Bug Report
Yes, it's possible, but not with just one call. You'll have to use pagination, as outlined in
https://developers.facebook.com/docs/graph-api/using-graph-api/v2.5#paging
In this case, the paging.next property in the JSON response contain the link/call to get the next results. I'd recommend to set the limit to 50 or 100 maximum,
Curious if the PHP Facebook SDK allows me to change only my own profile picture and cover photo. From the reading I've done I'm thinking no, but I wasn't able to find any recent, direct articles.
Any help is appreciated.
Looks like you can't actually change it, but you can get half way!
Setting Facebook Cover Photo via API
"ThereĀ“s no API support for changing user profile cover, but you can upload a photo and then redirect user to: http://www.facebook.com/profile.php?preview_cover=PHOTO_ID"
I'm putting together an application in facebook, part of which requires a user to input a bunch of information into a form, including a video and a number of text fields.
For my application, I'm using a combination of HTML, PHP, mySQL and Javascript.
I want to be able to upload the users video file to facebook using the PHP SDK in the same page as I am inserting their info into my database. I want something similiar to the photo solution here: Exception when uploading photo with Facebook Graph API. But I'm not sure what the array key should be for the video itself.
Can any give me any ideas?
My apologies,
I realized that the solution I linked to works. However, you have to give facebook time to process the video, otherwise the graph api replies false.
Can I use friends pictures from their gallery after getting permission
in my application?
Not download them just keep a link/reference to selected photos
using Facebook graph API and PHP.
Sure you can - hopefully you will not do anything nasty with them :P You should make it clear to your users what your intentions are and how you plan to use their photos and for what.
I am trying to develope a facebook application that allows the users to create an album in my application and upload photos to it. I read some articles but those were very confusing. Could anyone tell me where I can get some simple article regarding this. I have no idea where to start from.
Thanks in advance.
The first thing is getting the user authenticated and with the corresponding permissions into your app (you will need special permissions to upload a picture into his albums, or creating a new one).
Once you have the permissions and therefore, the auth token, you can upload pictures by making post requests to the Graph API.
http://developers.facebook.com/docs/reference/api/photo/
Look at the bottom where it shows you an example using cURL.