Team:TU Delft/fb display
From 2010.igem.org
(Difference between revisions)
Line 25: | Line 25: | ||
var n = </html>{{{count|6}}}<html>; | var n = </html>{{{count|6}}}<html>; | ||
var imghtml = ""; | var imghtml = ""; | ||
+ | var albumID = </html>{{{album|135033906513449}}}<html>; | ||
var done={}, j=0, und; | var done={}, j=0, und; | ||
if(response.error) { | if(response.error) { | ||
- | $("#photobox | + | $("#photobox" + albumID).html("Facebook returned an error: " + response.error.message); |
return; | return; | ||
} | } | ||
+ | |||
+ | try { | ||
var remaining=response.data; | var remaining=response.data; | ||
Line 44: | Line 47: | ||
j++; | j++; | ||
} | } | ||
- | $("#photobox | + | $("#photobox" + albumID).html(imghtml); |
+ | } | ||
+ | catch (err) { | ||
+ | $("#photobox" + albumID).html("Error: " + err.description); | ||
+ | } | ||
} | } | ||
Revision as of 22:15, 27 July 2010
This is a template page that displays random pictures from a facebook album.
{{:Team:TU_Delft/fb_display|album=ID|count=Number of images|css=CSS class}} Parameters: album: Facebook album ID count: Number of pictures to display css: CSS class for each image
loading facebook photo's...