i need to get the facebook profile picture of anyone by passing their id. But i no need to use facebook API or Graph anything else.. Just i need to give the url with that id.. Is it possible to get the profile picture in this way? I tried in google but i didnt get it. If anyone knows this please respond me...
2 Answers
Well, I think the only options available are:
- https://graph.facebook.com/[PROFILE_ID]/picture (You can include this URL inside a tag and it will work).
- Scrap yourself the page corresponding to the profile, i.e. http://www.facebook.com/profile.php?id=[PROFILE_ID] and get the URL of the picture there.
I would suggest you to use the first one, because it gives you more flexibility about the picture size (?type=small
, ?type=thumbnail
, etc).
Edit
Keep in mind that this answer is from 2011, and Facebook makes changes in its APIs frequently.

- 5,347
- 2
- 30
- 47
-
2+1, for the first option but I would remove the second option because this is not the right way to do it! – ifaour Mar 15 '11 at 14:53
-
The first option will force you to follow a redirect when fetching the profile picture. If you're fetching a batch of these following a recent friends request, say, better to go directly to the CDN URL. You can get this as part of the payload from the graph API. – Ken Jun 21 '13 at 13:36
-
type must be one of the following values: small, normal, large, square – mogetutu Oct 20 '13 at 20:03
-
1The second option may be subject to user permissions. So if it's not public, it may not show up. Not sure about this though. – Philll_t Feb 03 '14 at 05:08
Apart from using Graph API as already mentioned above (https://graph.facebook.com/[PROFILE_ID]/picture), there are a couple more ways:
FlipTop has a service that pulls up all sorts of information on Facebook users, including direct CDN URLs (e.g. https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/275588_504804917_147319_n.jpg) of profile pictures. (Link to API documentation)
Cloudinary has a similar service, but with hosting thrown in the mix. They do require you to open an account, but it's free. Then you can use their CDN URL format to link to any picture like this: http://res.cloudinary.com/[YOUR_ACCOUNT]/image/facebook/[PROFILE_ID].jpg (Read more here)

- 11
- 1
- 2