- Previous: Developer Callbacks
- Up: Developer Callbacks
- Next: getAlbum
getAlbumList
The getAlbumList parameter is the absolute URL of a callback function on your server that provides a list of the albums the currently logged in user can see. It should be specified (along with getAlbum) 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>
getAlbumList call
The PhotoShow authoring widget will call your getAlbumList function via an HTTP GET, passing the following parameters in the query string:
- sessionKey: your session key
- userId: your user id
For example:
GET http://www.partnerdomain.com/integration/photoshow/getAlbumList.php?sessionKey=XXXXX&userId=YYYYYY
getAlbumList response
Your getAlbumList function should respond with an XML document containing a list of albums. For each album, the response must contain a unique ID which identifies it on the integrating site, a name which can be displayed to the user to identify the album and a count of the number of photos within the album. Optionally, the album information may also contain the URL of a thumbnail image to display on the album selection screen.
For example:
<getAlbumListResponse>
<albums>
<item>
<id>33247</id>
<name>testA album</name>
<thumbnailUrl>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/n774109975_353307_4827.jpg</thumbnailUrl>
<photoCount>4</photoCount>
</item>
<item>
<id>3324</id>
<name>testB album</name>
<thumbnailUrl>http://photos-975.ll.facebook.com/photos-ll-sctm/v106/129/109/774109975/n774109975_353307_4827.jpg</thumbnailUrl>
<photoCount>9</photoCount>
</item>
</albums>
</getAlbumListResponse>
If an error occurs then an error response should be returned. For example:
<getAlbumListResponse>
<status>failed</status>
<reason>DB is temporarily unavailable recovering albums</reason>
</getAlbumListResponse>
- Previous: Developer Callbacks
- Up: Developer Callbacks
- Next: getAlbum

Comments
Please sign in to post a comment.