Team:TU Delft/fbtest
From 2010.igem.org
(Difference between revisions)
(One intermediate revision not shown) | |||
Line 5: | Line 5: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | + | var albumName = "</html>{{{album}}}<html>"; | |
- | + | function fb_albums(response) { | |
- | + | for(var i in response.data) { | |
+ | var item = response.data[i]; | ||
+ | $("#photobox").append(item.name + "<br>"); | ||
+ | } | ||
+ | |||
+ | var n = 6; // select 6 random pictures | ||
+ | for(var i=0;i<n;i++) { | ||
+ | |||
+ | } | ||
} | } | ||
$(function() { | $(function() { | ||
- | + | var baseurl = "https://graph.facebook.com/112242102125963/"; | |
+ | |||
+ | function addScript(url) { | ||
+ | var html = '<script src="'+ url + '" type="text/javascript"></scr'+'ipt>'; | ||
+ | $("#fb_scriptload").html(html); | ||
+ | } | ||
+ | |||
+ | function fetchAlbums() { | ||
+ | addScript(baseurl + "albums?callback=fb_albums"); | ||
+ | } | ||
- | + | fetchAlbums(); | |
- | + | ||
- | + | ||
}); | }); |
Latest revision as of 00:19, 16 June 2010