Slash Mobile data-transfer costs with SQIJ

Connecting to the web from your mobile is all well & good, but the sky-high bandwidth costs have always put me off. Enter Scott Powell, and his new mobile-framework SQIJ.

Sqij is all about making the mobile web a fast and fun experience. This is achieved through specially written ‘applets’, which keep the user interface simple, while adding the power of dynamic updating with Sqij’s ‘push’ capabilities. This makes live data feeds possible, like in the Finance applet, and alerts with sounds like the Email Monitor. Applets also employ Sqij’s smart-caching, giving a snappier feel and lower wireless bills!
Sqij is also an instant messenger, allowing you to chat in realtime with other Sqij users.
Some popular applets available for free are:

  • Weather
  • Finance
  • Traffic Incidents
  • RSS News Reader
  • Travel (world times and currency converter)
  • Dictionary
  • Yahoo Local
  • Twitter

The Twitter applet gives you an easy-to-use interface on timelines, updating, and direct messaging, all without SMS! You can receive alerts on either timeline changes or incoming direct messages.

SQIJ is available for all SmartPhones and Windows Mobile Pocket PCs. There isn’t much information on the website, but SDKs exist and there is an area for developers.

My own Facebook Application Directory

It’s been just over 2 weeks since I wrote my first Facebook Application. It’s been a huge learning experience. The Sudoku application went viral 4 days ago - going from 100 new users a day to 500, then 2000 new users a day. More on that in a future post - here’s my latest website:

Facebook Application Directory

My own directory of applications written for Facebook, and my first venture into the world of directories. As a launch bonus, if you have a Facebook Application and need someone to add it to their profile then submit it to the directory and I will also add it to my profile.

How to set third-party cookies with iframe Facebook Applications

So you’ve written your facebook application, and you’ve gone the quick’n'easy route by making it an iframe application. The world is your oyster and any day now you’ll have your millionth user. Until you try to write a cookie.

Cookies written by your application will be treated as Third Party cookies by your browser, and in IE6 with the default privacy setting of ‘Medium’, they will be deleted. This can lead to all sorts of problems, from user settings not being remembered to total app breakdown (which, funnily enough, is what happened to me).

As it turns out, there is a simple solution. If you supply a ‘compact privacy policy’ with your page, then IE will treat the cookies with respect and let them through.

To the code

Just add this to the start of your page (every page where cookies will be written):


HttpContext.Current.Response.AddHeader("p3p", "CP=\""IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""")




How to write a FaceBook Application in 10 minutes

Writing F8 apps is where it’s at right now. Everybody knows it. The userbase is huge and now we have a (free) API to. Everything is good….but the documentation.

I spent a day writing my Sudoku Facebook application yesterday. I already had the sudoku javascript widget ready to go - the time was spent wading through pages of documentation and downloading toolkits that (as it turns out) I didn’t need.

As far as I can tell, Facebook allows you to create applications that appear to the user in 2 different areas.

1 - The profile. This the ‘main user page’ as far as Facebook is concerned. Here is where your main summary details are displayed and your comments wall. It would be great to have your widget displayed here, but the big limitation is that applications that use javascript are not allowed here (You must use FMBL, the facebook version of HTML). Too bad for me. What we can do is display a small ad to take the user to the Canvas page.

2 - The ‘Canvas page’. This is an entire page that your application gets to use (you can have multiple pages if you want). On these pages you can choose to display content from another website through an iframe, so that is what we’re going to do.

Ok, thats it for the overview. Start your clocks and lets get cracking.

1. Create your demo page. (2 minutes)
This is the page that the user will see on their canvas page. If you already have a page that you want to use, great. If not, then just copy this code for a guessing game.

<script type=text/javascript>
var iRandom;
function Restart()
iRandom = Math.floor(Math.random()*10)+1;
alert('OK, I am thinking of a number between 1 and 10');
function Guess()
var yourGuess = document.getElementById('myGuess').value;
if (yourGuess>iRandom)
	alert('Too High.');
if (yourGuess<iRandom)
	alert('Too Low.');
if (yourGuess==iRandom)
	alert('Well done! You guessed it.');
<div>Enter your guess between 1 and 10: <input type=text id='myGuess' name='myGuess'>
<input type='button' onClick='Guess()' value='Guess'>
<input type='button' onClick='Restart()' value='Start Again'>
<script type=text/javascript>

It’s not going to win any awards, but it gets the job done. Save the file somewhere on your website as ‘guess.htm’. Mine is saved at

Ok, now log into Facebook.

2. Install the Developer Application. (1 minute)
This allows you to create applications.

3. Create the Application. (30 seconds)
Click the ‘create application’ link
4. Fill in the Application details. (6 minutes)
There are heaps of fields you can enter, I am just going over the ones you need to get this demo working.

Application Name: Any name you want. I used ‘Guessing Game’.
Terms of Service checkbox: Check it.
Click ‘Optional Fields’.
Callback Url: This should be the root directory that your ‘guess.htm’ page is found at. You must also add a ‘/’ at the end. I used ‘’.
Canvas Page URL: This is the most confusing part, and wasted me heaps of time. What they want you to enter is basically a directory name for your applcaition. The name must be 7 characters or more, and must be unique from other Facebook applications. I used ‘guessab’ (so you can’t). When you add ‘’ to the front you have the Canvas page URL.
NOTE: If you use upper case in the Canvas Page URL, it will be converted to lower case automatically. Also, case is important, so if you use upper case in your links later on THEY WON’T WORK.
Tick ‘Use iframe’: This means that your canvas pages will use an iframe.
Application Type: Leave it at ‘website’.
Can your application be added on Facebook?: Tick ‘Yes’.
Application Description: I used ‘Cool guessing game’. If you disagree, feel free to use your own description.
Default FMBL: We will fill this out last, so leave it for the moment.
Default Profile Box Column: Tick ‘Narrow’.
Side Nav URL:OK, here is where we put a link in the side nav to the canvas page.
The full canvas page has the format:< value entered in Canvas Page URL>/
So for me, the full canvas page URL is:
Facebook maps ‘’ to your Callback URL, so what is loaded in the iframe is:
Note: Notice there is no ‘/’ inserted in guess.htm, that is why you have to put it in your Callback URL.

Anyway, now we can go back to
Default FMBL: This is the text that will go on the user’s profile. Lets just put another link to our game on the Canvas page. I entered:

Lets play a <a href=’’>Guessing Game</a>

5. Add the application (30 seconds)
From within ‘My Applications’, click on ‘View About Page’ for your new application. Then click ‘Add Application’, and confirm this.

6. Done! (Lets play)

Click on the link in either the left nav panel or the main profile panel and knock yourself out.

Test my Facebook Application :)

I’ve developed my first Facebook application (Facebook is a US college social network) and was hoping there are some people who could test it for me.

If you are a member of facebook, just enter:

Then click ‘Add this application’ at the top right of the page.

Any feedback is much appreciated.


Celebrities Widget

The sort of work that I do on the internet is extremely serious, and this is more of the same.

A Celebrity Widget! Yep, now you can get up to the moment pics of the most popular celebs (male or female) zapped straight onto your site or blog.

Now that was a fun use of my time ;). Of course, you can get your own Celebrity Widget.

Automatically make an ‘Add to Blogger’ button for your Widgets

Since creating the Sudoku Google Gadget I’ve been going crazy building all kinds of widgets (so craaazy, that I have neglected this blog). One of the biggest hurdles getting the widgets ‘out there’ is that plenty of blog owners have no idea how to add the widget code to their blog. So lets make it easy for them. Lets just give them a ‘Add to Blogger’ button.

Blogger/Blogspot have actually done the hard work already, allowing widgets to be added by using either a GET or POST to a specific URL (More Details). All we have to do is come up with the correct form of the querystring and then wrap a button around it.

So that’s what I did.

Just enter the name and code for your widget in the top text boxes, press the Create button, and you get the code to add to your website. The code renders as a button, and we’re done. Easy!

To test it out, I took this HTML:

Get on down to <a href=''></a>

with the widget name ‘Test Widget’. Pressed the create button, and came up with:

<script type='text/javascript'> function AddToBlogger() { var sCode="undefined";self.location.href='' + sCode ;} </script> <input type='button' value='Add Test Widget to my blog' onClick='AddToBlogger()'>

And here is what it looks like:

My own Sudoku Google Gadget

I’ve been playing around with different ways of driving traffic and I thought it was time to create my own Google Gadget. Creating the gadget was easy - turns out getting the gadget listed in the content directory is going to be the tough part.

Anywho, here is what I came up with


Now I know you desperately want this for your own blog or website, so you can get the code here - Sudoku Google Gadget

You can also add it to your Google Homepage just by clicking this button:
Add to Google

So enjoy sudoku, if that is your thing, and I’ll let you know in a few weeks how it is going as a traffic driver.

MySpace API

I have updated my MySpace API to accept HTTP POST requests as well as GET. This means that the fields can be as long as you like, which is good for blog posts.

Try it out:

The code for the test page is:

<form name='form1' id='form1' method="post" action=''>
<tr><td>Post Subject</td><td><input type="text" id='txtSubject' name='txtSubject'></td></tr>
<tr><td colspan=2>Post Body</td></tr>
<tr><td colspan=2><textarea id='txtBody' name='txtBody' rows=5 cols=31 width=100%></textarea></td></tr>
<tr><td>MySpace Email</td><td><input type="text" id='txtEmail' name='txtEmail'></td></tr>
<tr><td>Myspace Password</td><td><input type="password" id='txtPassword' name='txtPassword'></td></tr>
<tr><td></td><td><input type=submit value="Submit" id='btnsubmit' name='btnsubmit'></td></tr>

As before, I am happy to share the code if you request it.

MySpace API - Automate your Blog posts

I have written a small API which allows you to add blog posts with a simple URL GET.
Update: It seems that sometime recently the MySpace pages for posting to your blog have changed, and so this API is now broken. I will fix it shortly when I have the time.

The format for usage is:[Post Subject]&Body=[Post Body]&Email=[Your Myspace Email]&Password=[Your Myspace Password] 


Remember to HTML encode the [Post Subject] and [Post Body]

To try it out:

The code for this simple test page is:

<script type="text/javascript">
function SubmitBlog()
var sSubject = escape(document.getElementById('iSubject').value);
var sBody = escape(document.getElementById('iBody').value);
var sEmail = document.getElementById('iEmail').value;
var sPW = document.getElementById('iPassword').value;
window.location = "" + sSubject + "&Body=" + sBody + "&Email=" + sEmail + "&Password=" + sPW;

<tr><td>Post Subject</td><td><input type="text" id='iSubject'></td></tr>
<tr><td colspan=2>Post Body</td></tr>
<tr><td colspan=2><textarea id='iBody' rows=5 cols=31 width=100%></textarea></td></tr>
<tr><td>MySpace Email</td><td><input type="text" id='iEmail'></td></tr>
<tr><td>Myspace Password</td><td><input type="text" id='iPassword'></td></tr>
<tr><td></td><td><input type=button value="Submit" onClick="SubmitBlog()"></td></tr>

No logs of requests are kept (I have no interest in stealing your password and becoming the most hated man on the internet). All the source code is in ASP.Net. If you would like a copy, send me an email.

At the moment, because all requests are handled via GET, the body posts must be reasonably small. If there is interest I will expand the API to allow POSTs so that the blog body can be larger.