getAlbum

The getAlbum parameter is the absolute URL of a callback function on your server that provides a list of the photos in a particular album. It should be specified (along with getAlbumList) in your configOptions object when you call the authoring widget. For example:

<script type="text/javascript" src="http://api.photoshow.com/widgets/make_photoshow.0.1.0.js"/></script>
<script type="text/javascript">
    var configOptions = {
        postShow: 'http://www.mydomain.com/callbacks/post_photoshow.php',
        sessionKey: 'sk_123h8324hrkl234',
        userId: 'user_17',
        viewerWidth: '320',
        getAlbumList: 'http://www.mydomain.com/callbacks/photoshow_album_list.php',
        getAlbum: 'http://www.mydomain.com/callbacks/photoshow_album_contents.php'
    }
</script>
<a href="javascript:PhotoShow.widgets.embedMakePhotoShow('YOUR_DIV_ID', 'YOUR_DEVELOPER_KEY', configOptions);" title="Add a multimedia PhotoShow">Add a PhotoShow</a>

getAlbum call

The PhotoShow authoring widget will call your getAlbum function via an HTTP GET, passing the following parameters in the query string:

  • sessionKey: your session key
  • userId: your user id
  • albumId: album id, as passed back to the widget in one of the album elements within a getAlbumListResponse.

For example:

GET http://www.partnerdomain.com/integration/photoshow/getAlbum.php?sessionKey=XXXXX&userId=YYYYYY&albumId=1231232

getAlbum response

Your getAlbumList function should respond with an XML document containing a list of photos. For each photo, the response must contain a unique id which identifies it on your site, the url where the image may be recovered, a thumbnailUrl (optional) which can be used to display a lower resolution copy of the image during uploading, and a caption (optional) to be displayed with the photo.

For example:

<getAlbumResponse>
    <photos>
        <item>
            <id>3324777026132730907</id>
            <url>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/n774109975_353307_4827.jpg</url>
            <thumbnailUrl>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/t774109975_353307_4827.jpg</thumbnailUrl>
            <caption>Jimmy's Little League game</caption>
        </item>
        <item>
            <id>3324777026132730908</id>
            <url>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/n774109975_353308_5121.jpg</url>
            <thumbnailUrl>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/t774109975_353308_5121.jpg</thumbnailUrl>
            <caption>Jimmy beats out the throw to first</caption>
        </item>
        <item>
            <id>3324777026132730909</id>
            <url>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/n774109975_353309_6016.jpg</url>
            <thumbnailUrl>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/t774109975_353309_6016.jpg</thumbnailUrl>
            <caption>Rounding third base and heading for home</caption>
        </item>
        <item>
            <id>3324777026132730910</id>
            <url>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/n774109975_353310_6313.jpg</url>
            <thumbnailUrl>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/t774109975_353310_6313.jpg</thumbnailUrl>
            <caption>He scores!</caption>
        </item>
    </photos>
</getAlbumResponse>