How to get large photo URL in one API call?

John Wright picture John Wright · Sep 29, 2011 · Viewed 50.7k times · Source

I want to display large photos in my Facebook app's feed view immediately. Is it possible to get the large photo src URL from a stream/feed using one API call? The photo id is returned in the stream/feed and one can of course then supply this photo id in an additional FQL or graph API call to retrieve all the information about that photo. However, is there a way using multi-query or batch calls to get a larger photo src url using one API roundtrip?

Answer

streetlogics picture streetlogics · Sep 29, 2011

I haven't tried this with stream/feed photos, but the generally accepted way of doing this is:

http://graph.facebook.com/{ID of object}/picture

If you want the "large" version, you would do:

http://graph.facebook.com/{ID of object}/picture?type=large

I'm not 100% sure if this would work for an actual photo (instead of a user profile picture or page profile pic), but I have a hunch it will - the only caveat is that you obviously must have a logged in user that is authorized to view the photo (unless it's public).