Friday, August 9, 2013

Facebook Picture to ID


Its recently come to my attention that most people assume Facebook pictures can't be tied directly back to the owner given only a direct link to the picture. Well, this little utility was written to show just how easy it could be to use Facebook image links posted in IRC or elsewhere to track down the original owner of the content, and people tagged in the photo.

Parsing the URL

Take the following image link that I pulled from a random Google image search.
The main portion of the URL that we're interested in is the filename of the JPEG.
The middle number is the FBID of the original photo album. This can be accessed by modifying a simple GET request to Facebook.
From here it's as simple as parsing out the data that we want from the HTML. For this I decided to use BeautifulSoup and Python for simplicity and readability sake.


# ./
Album URL:

Owner (Page/Group): Best photos of the world
Owner URL:

Tagged with profiles:
Vikas Gaikwad (
Lakhan Bhanuse (
Kiran Ghoble (
Abin Chakkara (
Vitthal Jadhav (
Harshit Kumar (
Manish Sharma (
Vivek Bhumkar (
Sopho Arakishvili (
Sunil Kumar (
Shahib Singh (
Mita Das (
Sneha Sweet (
Rakesh Biyani (
Zura Arakishvili (
Dalia Edith Pérez Castañeda (
Shivu Vicky (
Forgive To Forget (
Amit Verma (
Khursheed Patel (
Munmun Guha (
Krishna Nk (
Debabrata Paul (
Leveny Pradas West (
Adele McLeod (
Leonardo L. Canillas (
Mahshid Rh (
Ajay Giri (
Sudha Bharti (
Mehrdad Rahimi (
Sameer Sam (
Crystal Flowers (
Vesna Nikolcov (
Ziba Rahimi (
Mary Smith White (
Kỉ Hà Băng (

Tagged without profiles:
Prashant Rammtake
Lawrence Luggionskky
Maria C. Lanza
Vìvék Yàdûwáñshí
Satendra Yadav

Getting the source

 git clone


Some results on Facebook are limited to users that aren't logged in. In order to get greater results, adding login capability to the script would likely yield more information. Another idea would be to combine this with Facebook Query Language (FQL) in order to scrape information on each owner and taggee. For more information about FQL scraping check out Blackhat Library


  1. I'm trying to figure out how to download it it my computer, or do you find the file owner from the thing online? The download of beautiful soup goes to a directory listing of tar.gz files. How do you open those?

    It's kind of complicated.


  2. I need to view this photo, can u help me buddy?

  3. Using this technique on http://SocialFeeds.Club/ too .. Works great! Thank you.

  4. hello thanks for this interesting article;

    what does the other numbers means ? 044981? and 1858736086 ? in 044981_547409191984903_1858736086_n.jpg

    thanks so much for tha answer

  5. Unable to fetch the id. may be outdated tutorial. thanks anyway, you have an interesting blog here, keep writing more.


  6. To activate this feature go to your account setting-->Account security--> Check on secure browsing (HTTPS). After all your browser turn http into https that is a secure channel to transfer information.
    Click here

  7. Please let me know if you’re looking for a article writer for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you! facebook hack

  8. You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. Snapchat Hack