Setting up a photo collage

This Facebook application will create an exquisite collage of pictures of the current user which are picked randomly from his/her albums. Also, it will create a new album in the user's profile and post the collage generated in it.

Getting ready

You should have created index.php and config.php as mentioned in the beginning of this chapter. Also, you should have provided user_photos extended permission to the application. Additionally, download a TrueType font of your choice as explained in the Designing a "My Fast Friends" Facebook application recipe.

How to do it...

The following steps will demonstrate how to set up a photo collage:

  1. Open index.php and add the following PHP code before the <html> code. Here, first we define ...

Get Facebook Application Development with Graph API Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.