Question

If i have facebook users photo's URL, for example: https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-ash3/885089_523687507674066_732194510_o.png

Can i retrieve user's name or id which own this photo?

Was it helpful?

Solution

First, fetch the photo_id from the url. For eg:

Link: https://fbcdn-sphotos-e-a.akamaihd.net/hphotos-ak-ash3/885089_523687507674066_732194510_o.png

PhotoId: 523687507674066

Then make the \GET request to this ID. Just like this:

\GET http://graph.facebook.com/523687507674066

(you can validate this link in the browser)

You'll get the JSON response just like-

....
from: {
  category: "Recreation/sports website",
  name: "Emocje do pełna",
  id: "290868840955935"
},
....

So, you just have to fetch the id from the from paramter

OTHER TIPS

Yep https://www.facebook.com/photo.php?fbid=523687507674066 The middle number is the photo id

Late response on this - sorry.

Taking the middle number from the image file name, you can sometimes find the profile it came from.

www.facebookcreep.com has a tool for this. It takes the number and looks up to see if it can locate the profile. I believe the pictures needs to have been shared to public is the downfall though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top