What is the current proper way of creating Facebook Tab's with interaction?

99 views Asked by At

I need to create an interactive Facebook Tab for a client, similar to this:

http://www.facebook.com/#!/knnktr.

The application has a number of slides, which are basically images that will scroll left/right as the visitor clicks on two arrows on either side of the displayed image.

I could do this in Flash, but I could also attempt doing this with JavaScript.

Now, I understand that Facebook's APIs often change, and iframe's are currently not an option.

What is the best/correct way to achieve this. Should I stick with the Static FBML? If we have an option to use JavaScript, we'll prefer that above Flash. The question is, does the Static FBML limit the ability to perform some JavaScript calls.

I need to respond to mouse clicks, and I also need to be able to make remote AJAX requests to our server.

1

There are 1 answers

0
phillee On BEST ANSWER

If you're building a tab, FBML/FBJS are your only option. The official FB docs for FBJS are pretty good: http://developers.facebook.com/docs/fbjs/

A couple caveats about FBJS:

  • They rewrite your Javascript to only allow limited functionality. If you're used to a nice Javascript lib like jQuery you're out of luck.
  • You can't use external js includes, the Javascript must be in the same page

Take a look at the event, animate and AJAX sections in the docs. Taking a quick look at your example I don't see anything you couldn't do with FBJS.