, dijits and the FB Graph API (part 1)

» 27 February 2011 » In development »

I’ve spent a few hours this evening checking out the new dojo object store implementation, looking to see if I could hook it up to the Graph API.

Getting id/identity and basic query data back from the Graph API took all of five minutes – using to automate handling the callbacks from the Graph APIs JSONP responses. The new store is much simpler to implement than the old interfaces. Big win there.

I’ve not managed to get full querying working just yet, as the Graph API is pretty big and the range of connections available for each of the different types in the Graph API isn’t documented particularly clearly.

I’ve also run into some snags wrapping my object store in a store. I’ve successfully got a ComboBox populated from my friend list if I take the output from my object store, use that as the constructor for a store and then pass that into the constructor of the, but it’s a bit messy. I’m sure there’s something I’ve just missed out as this definitely shouldn’t be necessary.

Still, not a bad effort so far. Hopefully I’ll have a full object store and data store implementation ready to roll soon, meaning you’ll be able to populate all your favourite dijits with data from your favourite social network :)

I’ll get an example online soon and put the code up on github with create a patch for dojo trunk once I’m happy with the results. Things are a bit hectic at the moment tho so it might take a few weeks…

Tags: , , , , , ,

Trackback URL

  1. mrtom
    19/03/2011 at 12:38 pm Permalink

    the retour data from FB is json with header “data” but dojo look for somthing like “items” just change the first “data” from your json with “items” it’s work fine