You can create a Facebook application from scratch, but it's easier to use a site such as Popfly. This allows you to create apps without coding. We're going to create an application that maps graphics on to a rotating sphere - either third-party graphics or users' own photos.
Popfly applications are called mashups. To make one, click the Create, Mashup link. This loads the Popfly developer, which has a series of building blocks (or code objects) that can be dragged on to the design surface. Each block can be modified to make it act as you wish, then linked to other blocks to build a complete application.
Drag the block you want to use into the design surface, then click the wrench next to it to modify its properties. This zooms into the block and lists elements that can be changed (types of images in this case). When you've finished making changes, click the wrench again to return to the main screen.