
Wednesday, October 10, 2007
Golf
I've started to get interested in playing golf again. My wife Rebecca got me a gift voucher to a driving range for a fathers day present. Since then I managed to score an early xmas present in the way of some new golf clubs. I played my first real round on the weekend just past at the beautiful Northlakes golf course, it was unreal.
So all this golf excitement got me thinking that it would be cool to be able to share my golf round on my Facebook page, then I thought, maybe it would be cool to see my round plotted on a google map. So I started building a web application called GolfPlotr, the idea is that you can either enter your score card details, or use some windows mobile software (with GPS support) to enter your golf rounds. Then you can compare your rounds with other people.
I also made the Facebook version, so that you can see and compare your Facebook friends golfing endeavors.
It's still mostly a work in progress, but I think its getting to a useable stage.
Let me know what you think, or leave a comment at the GolfPlotr Blog.
Wednesday, October 10, 2007 1:55:41 AM UTC

Friday, October 05, 2007
Facebook.NET
I've been doing some Facebook application development using Nikhil Kotharis Facebook.NET framework. I must say, I'm very happy with it. I thought I might post a simple class that I created that lets me use the infinite sessions that Facebook can provide you with. It might be the wrong way to go about it, but it works for me.
Firstly you need to store the SessionKey from each user as they use your application, you should also store if they are infinite by checking the SessionExpires property on the Session object.
The class is:
public class FBASession : Facebook.Service.Core.FacebookSession
{
private FacebookService _service;
public FacebookService Service
{
get { return _service; }
set { _service = value; }
}
private Facebook.Service.Core.FacebookSession _session;
public Facebook.Service.Core.FacebookSession FBSession
{
get { return _session; }
set { _session = value; }
}
public FBASession(string appKey, string secret, string sessionKey, string userID)
: base(appKey, secret)
{
_service = new FacebookService(appKey, secret, sessionKey, userID);
_session = _service.Session;
}
}
Now with this we can use the data we store to create a session and send messages to any user of the application:
FBASession FBSession = new FBASession("<app key>", "<secret key>", "<stored session ID>" , "<facebook ID of user>");
FBSession.Service.Notifications.SendNotification("<facebook ID of user>", "<fb:userlink uid=\"" + facebookUserID + "\" /> has done something and wants you to know", null);
This will allow your facebook application to send a notification (or update the mini-feed etc ) to/of another user.
I was lucky enough to attend a presentation on ASP.NET Ajax at tech-ed that Nikhil presented, it was one of the better sessions at tech-ed, so thanks for all your effort.
Friday, October 05, 2007 1:25:01 AM UTC

Tuesday, October 02, 2007
JSON Serializer
Working on a project, I wanted to serialize the object as JSON:
using System.Web.Script.Serialization;
JavaScriptSerializer jss = new JavaScriptSerializer();
string serializedObject = jss.Serialize(object);
This is using the ASP.NET AJAX framework
I see that ScottGu has a post about building an extension method to perform this function .... very nice.
Tuesday, October 02, 2007 6:15:52 AM UTC
Sign In