Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting facebook profile picture

Tags:

facebook

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...

like image 273
Vinoth13 Avatar asked Mar 15 '11 13:03

Vinoth13


People also ask

How do I add a photo to my Facebook profile?

On the “Menu” screen, at the top, tap your profile. On your profile page, in the bottom-right corner of your current profile picture, tap the camera icon. A menu will open from the bottom of your phone’s screen. In this menu, tap “Select Profile Picture.” Select a photo from your phone’s gallery or your Facebook gallery.

How to replace Facebook profile picture with new one?

Your picture’s preview will appear on Facebook. Try to fit your photo’s main area in the circle using the “Drag to Reposition” handler. To crop your photo, click the “Crop Photo” option. Finally, click the “Save” button. And you have successfully replaced your old profile picture with a new picture.

How do I create a profile picture for free?

Canva’s free profile picture creator combines photo editor and design tools in one, so you can create beautiful PFPs in minutes. Launch Canva and search for “Profile Picture.” You may also search for “Facebook Profile Frame” and use it for any social media PFP.

How to search for a Facebook profile with a picture?

To search for a Facebook profile with a picture, simply upload the picture, then it will scan hundreds of social networks, run through its proprietary scammer database and organize results into a detailed report.


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.

like image 52
Manuel Pedrera Avatar answered Oct 29 '22 09:10

Manuel Pedrera


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)

like image 39
Igor Makarov Avatar answered Oct 29 '22 09:10

Igor Makarov