1

Can I get a big picture for graph objects?

Example:

//take id,name,picture,description from pages, that I like:

http://graph.facebook.com/me/likes?fields=id,name,picture,description&access_token=[token]

But how to get big picture of all these pages in one query? Is this possible?

1 Answer 1

3

Ok so essentially, you don't need to request the image at all. Once you have the object_id, and you want to display a large picture, all you have to do is use this URL -

https://graph.facebook.com/OBJECT_ID/picture?type=large

I don't store any profile picture URL's anymore, all I have to do is know the user/page_id and I have access to the profile picture via that object_id.

For an <img> element, just place the URL in the src attribute -

<img src="https://graph.facebook.com/OBJECT_ID/picture?type=large" />
12
  • i don't understand, is this a redirect URL? so, if i want to display a user picture, i need to know his id and just to add (suppose, i have a PictureBoxObject) PictureBoxObject.UrlToImage="https://graph.facebook.com/thisUserId/picture?type=large&access_token=[xxx]"? Aug 20, 2012 at 12:44
  • @lol - Exactly, that URL will return the actual large image. All you need to do is load the image that the URL returns...
    – Lix
    Aug 20, 2012 at 12:46
  • 1
    I don't understand what you are saying.... "i can't get of this image" - what do you mean by that?
    – Lix
    Aug 20, 2012 at 12:59
  • sorry, i can't get URL of this image, that returned in your example? Aug 20, 2012 at 13:06
  • That URL will give you the image... if you want the direct link to the image you'll have to request it specifically with more than one call to the API. If I may ask; Why do you need the direct URL?
    – Lix
    Aug 20, 2012 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.