Getting large photo with additional fields - Facebook - facebook

So this is how I'm retrieving Facebook friends and profile picture right now:
https://graph.facebook.com/{{user_id}}/?fields=picture,friends&access_token={{app_id}}|{{app_secret}}
However, the photo I get with it is small and the only way to get a large photo is:
https://graph.facebook.com/{{user_id}}/picture?type=large&access_token={{app_id}}|{{app_secret}}
So now I have to make two get requests; one for a large photo, and one to get the friends. I want to achieve both in one request. Is that possible?
Thank you.

The call
/{user_id}?fields=id,name,friends,picture.type(large)&access_token={access_token}
should do what you desire.

Related

facebook graph api - get posted images from users on page

I've searched a lot, but I did not get any full information.
I need to get all images which are posted to a specific fb page by users. And do I really ned to get that app reviewed? I only need this application during an exhibition over a weekend.
The fans take a picture at our booth and post it on our timeline. These images are to be displayed automatically on a screen.
How do I get to the pictures via the Facebook API?
update:
My first move was with the following:
graph.facebook.com/v3.1/[pageid]/feed?fields=picture,message,from
Since I need only the posts from others, I'm going to filter the response object.
Is there a better solution?
Okay, so PAGE-ID/visitor_posts?fields=picture,message did the trick!

Get set photo size from within a nested Facebook api call?

I am trying to get a list of all the photos posted within a Facebook event and then check if those photos have any comments. I am then searching those comments and comment replies for keywords. If the comments have the right keyword then I am saving the photo information for further processing at a later step.
My question is how can I return a certain photo size within my nested call.
Here is what I have so far:
{eventID}/?fields=photos{link,picture,comments{from,message,comments}}
This returns all the info I need other than the photo is only a thumbnail and I want a larger version of the photo?
I also want to keep it to one nested call if possible.
Thanks for any help you can provide me.
4/29 UPDATE:
I also tried this:
{eventID}/photos/?fields=images,link,comments{from,message,comments}`
However, this returns all the image sizes related to the photo and I want to be able to choose what size is returned. Is this possible?

Graph API: Post Image to User's wall (without Album)

I am somewhat desperate posting images via the graph api to a user's page.
What I want to achieve is: I've got an image in an amazon S3 bucket. I'm using the /userid/photos endpoint to post the image url and the message property like:
{
"url": "http://url.to/image.jpg",
"message": "Image description"
}
Now, the API creates an album called: "AppName Photos". When I post multiple time to the same album, it suddenly arranges all images in a view, but I want them to be seperate posts each by each.
So, what I want to achieve is: Post an image to a user's page without putting it into an album, as if the user uploaded the image hisself.
www.klout.com is able to do this. When I try to share & upload a custom image, the image is being stored in the "Chronic photos". How can I store the image there and not in an app-dependent album?
Got it. Simply iterate over all albums (you need user_photo access) and post to that specific album of type "wall".
It is not the most beautiful solution I've ever seen but at least it works and prevents grouping nicely :)

Facebook Graph API: get all public photos by a specific location

I don't think it's possible but maybe I'm missing something.
I would like to get all public photos attached to a specific location.
I tried:
graph.facebook.com/place/tagged/. This doesn't seem to return recent results.
graph.facebook.com/search?type=location&center=coordinates&distance=200. This only returns results related to a user (and users friends).
Any ideas on this?
I don't think this is possible.
if you just need photos from a specific place I would use instagram instead.
Facebook will never be so generous to give all public images to a query. That is like Terabytes of data which can be accessed by anyone with a line of code.
What you can do is get the images of the user and users friends. If its a public app, the user base should grow and you get exposure to more images.
Hope that helps.

How can I get the photo ID of the Facebook Cover Photo album?

How can I get the facebooks' user cover photo via the PHP SDK?
Thanks in advance.
B.W.
I have tried to loop through the Graph API, but it didn't work because the album was in the second page, and wasn't displayed.
There's no way to get this without looping through the album list - you could specify a higher limit in the request for the initial list of albums if you really need to do this without paginating through the albums