Archive for the ‘Facebook’ Category

New Facebook App: Telstra HeroMessage®

Monday, July 21st, 2008

Been very quiet, but I have been working a lot, among other things.

I am happy to announce the launch of my latest Facebook Application: Telstra HeroMessage. You can read all about it at the  Telstra HeroMessage® Facebook Application About Page.

I am pretty excited about it, a massive national media campaign is already underway.

Melbourne Facebook Developer Garage Presentation

Sunday, February 24th, 2008

On Friday I had the privilege of presenting at the Melbourne Facebook Developer Garage.

I’ve uploaded the slides for my Introduction to Facebook Development talk.  I had to leave early due to some client commitments, but the talks were excellent and I met some very interesting people working in the Facebook space.

There is also a Melbourne Facebook Developer Group - I am keen to get another event organised really soon.

Party like it’s 1999 - Social Networks are for Suckers

Monday, January 28th, 2008

It feels to me a lot like 99. Recession on the horizon, and so many people rushing to jump on the NextBigThing, with little thought, planning, insight or vision.

Every other day I quote on another Social Network project. It’s not my idea, I just need to pay the rent.

All of the requests are essentially the same

Like Facebook for X

Where X is a niche market.

Or the ever-popular:

X but with social networking features

Where X is an existing service or product.

My answer is fairly consistent.

I can do this, but it might make sense to develop something using the Facebook API and leverage the existing network and tools.

Despite this advice, many people seem convinced they can play in this space.

The hard part is not the software.

The hard part is building the community in the first place.

You can download any number of free applications that can manage an online community - the technology is not the problem. The real problem is attracting people to your application.

The true value of the Facebook Platform is the network. Facebook have the community already - all you have to do is build an application and participate in the social graph.

It’s still a hard job, but it’s easier than starting from scratch.

To this end, and given that most of my work in recent months has been developing Facebook Applications, I have started my own software company, aimed at doing exactly this - leverage the existing social networks:

FiniteStateMachine - Software Development for Social Networks

If you’re thinking of building a social network or social network features, why not discuss your ideas with us first, we might just be able to help you save time and money with a strategy for Facebook and friends.

Facebook Page and App Launch: Gillette Venus Beach Vote

Thursday, January 10th, 2008

I’ve just completed development of another Facebook Application for a major promotional campaign for Gillette.

The Venus Beach Vote application manages a voting competition inside Facebook and  is tightly integrated with the Gillette Venus Beach Facebook Page. It was developed in CakePHP with PHP 5, MySQL 5 and uses FBML for the presentation layer.

The new Facebook Page functionality expands the possibilites for marketing inside Facebook considerably - brands can create a page and then allow applications to interact with both the page and user profiles.

Venus Beach Vote is my largest Facebook Development Project to date and developed in a very short time frame to hit a hard deadline. I am even going to take a day off this weekend, I think I’ve earned it.

Amazon SimpleDB: death of the database?

Saturday, December 15th, 2007

With the announcement of Amazon SimpleDB Scoble has asked if Amazon Web Services are going to kill MySQL and Oracle.

I think the short answer is no, but the game is changing rapidly, and Amazon is at the vanguard.

SimpleDB basically acts like a big structured bucket.
The Model is represented by Domains. A Domain can have Attributes. Attributes are key/value pairs.

There is no schema attached to Domains, you can PUT any combination of attribute-values in the domain:
PUT (item, 123), (description, sweater), (color, blue), (color, red)
PUT (item, 456), (description, dress shirt), (color, white), (color, blue)
PUT (item, 789), (description, shoes), (color, black), (material, leather)

The real issue here is that developers are strongly tied to the RDBMS. Frameworks assume you are running on top of a relational database, so there is an instant barrier to entry. However, I suspect it won’t be long before the first set of libraries and drivers for SimpleDB are developed.

The much bigger issues are in the features that SimpleDB doesn’t have:

  • No ACID
  • No transactions (see ACID, above)
  • No relationships
  • No data integrity
  • No SQL
  • Latency

SQL is actually pretty incredible - it makes accessing structured data very simple. If you’ve ever played with other types of data store you miss SQL almost instantly (Prevayler, anyone?).

All of that said, Amazon continues to lead the way with Web Services. Consider SimpleDB a warning shot to the database incumbents.

Facebook How-To: scheduling profile updates

Monday, December 10th, 2007

Several of the Facebook Applications I have developed have required scheduling updates to Facebook User Profiles.

The process for scheduling updates is a little involved, but basically involves using a Session Key to push data to each User’s Profile.

  • Store the user’s Session Key.
  • Schedule an update with Cron
  • User the User ID and Session Key to create a Facebook Client Object make a Facebook API call.

The following samples are from a CakePHP project I recently completed and use the Facebook PHP Library. I’ve expanded the SQL so you have a better idea of what is happening behind the scenes.

Store the Session Key:

function beforeFilter() {
$this->facebook_user_id = $this->facebook->require_login();
$this->sessionKey = $this->facebook->api_client->session_key;
$this->Settings->query("UPDATE settings SET sessionKey = '{$this->sessionKey}' WHERE id = '{$this->facebook_user_id}'");
}

Each time the user hits the application I generally refresh the Session Key in my normal login/authentication process.

Make the API Call:

$data = $this->Settings->query("SELECT * FROM settings WHERE lastUpdated <= DATE_SUB( NOW(), INTERVAL 1 DAY) ORDER BY lastUpdated ASC LIMIT 1");
$id = $data[0]["settings"]["id"];
$sessionKey = $data[0]["settings"]["sessionKey"];
$this->facebook = new Facebook(FB_API_KEY, FB_SECRET);
$this->facebook->set_user($id, $sessionKey);
$this->facebook_user_id = $id;
$this->facebook->api_client->profile_setFBML($fbml);

This code grabs the first Faccbook User from the database who last updated a day ago and then creates a Facebook Client using the Facebook User Id and Session Key to make an API Call.

Note: When scheduling updates I generally use Cron to call a URL on my application with wget or Curl. Using this technique you can leverage the existing logic of your app and don’t have to write a standalone script.

Converting a FaceBook App to use Amazon S3

Friday, November 16th, 2007

I’ve just completed work on another Facebook application: Songbook.

This was a relatively straight forward conversion of the existing application to use S3 for data storage. Songbook allows users to upload and display a song in their Facebook Profile. The original development stored the files on disk and hit limits really fast … hosting large numbers of files becomes very expensive very quickly, not to mention performance issues.

I converted the whole thing to S3 very quickly - it’s actually easier in some respects to handle storing files in S3 than to disk. The application now has essentially limitless and very cost-effective storage capacity.

S3 really is incredible.

New York, New York

Monday, November 12th, 2007

I’ve been living in Melbourne for 7 years now, and I have decidely itchy feet.

I moved to Melbourne for work just after the dot-com crash of 2000 and it was always meant to be a temporary stop on my way to New York, which I visited and fell in love with.

I think it’s time to get that dream moving again.

I am happy to work remotely to get a foot in the door, if that suits. Happy to sign up for a short-term contract if it gets me to your fair city.

So, if you’re in New York and need a developer with lots of experience, expert skills in Java, PHP and Ruby, and a penchant for user experience, drop me a line.

Now Hiring!

Tuesday, October 2nd, 2007

Been very swamped with contract work, but I have managed to roll a Facebook App called Now Hiring into production for Taleo.

I had a list of updates, but the blog died a horrible and fatal death, and I can’t for the life of me remember what they where.

Except pagination in Rails with will_paginate is so good it’s terribly terribly frightening

Facebook Apps are very hard to debug

Tuesday, September 4th, 2007

I am working on a Facebook Application for a client and although the Facebook API itself is rich and elegant, debugging the app is very difficult. Facebook uses it’s own markup called FBML, which is pulled from your app, translated into HTML and Facebook commands and then displayed. This means that applications have to actually run on a remote server that is accesible by the Facebook back-end.

The development process reminds me of the halycon days of my J2EE days (test,fix,build,jar,war,ear,undeploy,waitdeploy,wait,swear):

  1. Make minor change in code
  2. Push the change to the server
  3. Undeploy the application from the test Facebook profile
    1. Remove application
    2. Delete all sessions and cookies
    3. Clear the local database
  4. Redeploy the application
  5. Find another ******** problem!
  6. Repeat

There has to be an easier way. I am going to look at some DNS magic so I can develop on my local machine and point Facebook to it. Problem with that, of course, is you need to reconfigure the application so the client can see it on a public server. Or run your dev box as public a server.