Skip to content

Instantly share code, notes, and snippets.

@salomvary
Created May 17, 2011 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salomvary/976199 to your computer and use it in GitHub Desktop.
Save salomvary/976199 to your computer and use it in GitHub Desktop.
get Castro Bistro (Budapest) daily menu
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-type" content="text/html;charset=utf-8"/>
</head>
<body>
<pre id="out"></pre>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
var query = FB.Data.query('SELECT message, created_time FROM stream'+
' WHERE source_id={0} AND actor_id={0} LIMIT 5',122722877774278)
isMenu = /hétfő|kedd|szerda|csütörtök|péntek/i;
query.wait(function(rows) {
for(var i=0; i<rows.length; i++) {
if(isMenu.test(rows[i].message)) {
document.getElementById('out').innerHTML =
rows[i].message + '\n(' + new Date(parseInt(rows[i].created_time)*1000) + ')';
break;
}
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment