Monthly Archive for November, 2009

Pictionary Singapore

Pictionary Singapore is having a charity sale for the Children’s Cancer Foundation.

If you would like to own numbered sets of the limited Singaporean edition and do your part for charity, follow these links to eBay to bid for the uniquely Singaporean sets:

0001
0002
0003
0004
0005
0006
1788
* Those are the serial number of the sets

Facebook: Sending App to user notifications through Javascript

If you refer to facebook’s documentation at http://developers.facebook.com/docs/?u=facebook.jslib.FB.ApiClient.notifications_send, you will notice that there are no parameters to specify an app_to_user notification type. To achieve this, you have to use the callMethod from the apiClient.

Here is a code snippet on how this can be achieved in a Facebook Connect site.

<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
 <script type="text/javascript">
	FB_RequireFeatures(["XFBML"], function(){ 
		FB.Facebook.init("API KEY", "relative_path_to/xd_receiver.htm"); 
		FB.Facebook.apiClient.callMethod("notifications_send",{to_ids:[000000000],notification:"hello",type:"app_to_user"},function(){alert("notification sent");});	
	});
</script>

This code sends a notification from the app to the specified user ids. When the notification is done, a javascript alert box tells us the task is completed.