“...I've been working since 2008 with Ruby / Ruby on Rails, love a bit of Elixir / Phoenix and learning Rust. I also poke through other people's code and make PRs for OpenSource Ruby projects that sometimes make it. Currently working for InPay...”

Rob Lacey (contact@robl.me)
Senior Software Engineer, Brighton, UK

A solution to the pain of FBJS

I’ve been trying to develop a small Facebook application and FBJS is getting in the way somewhat. We have an existing application which we can easily plug in to Facebook with a few tweaks but sadly most if not all of our jQuery is completely useless.

Facebook add security re-jig all of your javascript into its own namespace by prefixing ‘applicationid_’ to each function and variable and then only allow limited access to javascript by means of implementing their own slightly modified version FBJS.

Unfortunately this means our jQuery flounders and we have to rewrite to get the same functionality. One potential saving grace is this little script that someone has come up with

http://forum.developers.facebook.com/viewtopic.php?id=33519

Its a re-write of basic jQuery functionality in FBJS, so in theory you can just plugin your existing jQuery and it will just work. It hasn’t worked for me but I think I was being a little optomistic that everything would just magically work still I am going to keep on working with it to see what more I can get out of it.