Mosaic using Facebook profile pictures

We can easily download profile pictures of people using Facebook's Graph API. For instance, to download the profile picture of Mark Zuckerburg (Facebook ID - 4) you can simply use this link. Following the pattern we can download a lot of profile pictures by simply increasing the Facebook ID sequentially beginning at 4 (1,2 and 3 aren't used). You cannot however download the profile pictures of all users using this method because at this point of time Facebook ID naming pattern has changed but that pattern is also not too tough to figure out.

A scaled version of the mosaic of first 3249 profile pictures. The original file was 61 MB large.

Here are the steps I followed to create a mosaic of first 3249 profile pictures on Facebook:

  1. For each fb-id beginning at 4, check if it is the default silhouette of Facebook using json data obtained from this link.
  2. If the Image is not silhouette then download it.
  3. Resize the Image to 100x100 pixels.
  4. Join the resized images to form a mosaic.

Check out the python script here: