Permalink
Browse files

[site notifications] initial version of notification fql query

... gets site notifications into the toolbar
  • Loading branch information...
1 parent e82db0d commit a3d2a382fe803ae57b3d5166a1364a7aae0de970 @elgenie elgenie committed Aug 13, 2009
Showing with 17 additions and 4 deletions.
  1. +16 −2 components/facebook.js
  2. +1 −2 notes
View
@@ -686,7 +686,21 @@ facebookService.prototype = {
fbSvc._eventInvs.update( data.event_invites );
fbSvc._reqs.update( data.friend_requests );
}
- })
+ });
+
+ var query = " SELECT title_text, href FROM notification "
+ + " WHERE recipient_id = :user and is_hidden=0";
+ query = query.replace( /:user/g, this._uid );
+ this.callMethod('facebook.fql.query', ['query='+query], function(data) {
+ for each( var notification in data ) {
+ vdebug(notification);
+ fbSvc.showPopup('you.req',
+ 'chrome://facebook/content/poke.gif',
+ notification.title_text,
+ notification.href);
+
+ }
+ });
},
parseUsers: function(user_data) {
users = {};
@@ -800,7 +814,7 @@ facebookService.prototype = {
fbSvc.notify(null, 'facebook-wall-updated', loggedInUser.wall);
if (fbSvc._loggedInUser.wall < loggedInUser.wall) {
fbSvc.showPopup( 'you.wall', 'chrome://facebook/content/wall_post.gif',
- 'Someone wrote on your wall',
+ 'Someone wrote on your wall',
'http://www.facebook.com/profile.php?id=' + fbSvc._uid + '&src=fftb#wall');
}
}
View
3 notes
@@ -8,7 +8,6 @@ install prereqs (from http://developer.mozilla.org/en/docs/Mac_OS_X_Build_Prereq
$ sudo apt-get install orbit orbit-dev glib
unfortunately, you'll get errors from glib when building on an x86 mac complaining about the architecture.
-
compile idl file:
Makefile
@@ -30,4 +29,4 @@ ari@Ari:platform/client/firefox$ cat `which FirefoxDev.sh`
to persist data across multiple windows, try http://www.xulplanet.com/references/xpcomref/comps/c_hashpropertybag1.html
to package:
-. build.bat // works in bash ... zomg!
+. build.bat // works in bash ... zomg!

0 comments on commit a3d2a38

Please sign in to comment.