I've written an ajax rating snippet, you'll find a demo at http://apps.new.facebook.com/ajaxrating/

It is based on Paul OB's CSS Star Matrix Pre-loaded

The source code below, should be self explanatory, but if you need input on how to do fbjs ajax, you'll find documentation and examples over at the facebook development site

[sourcecode language='php']
< ?php
// the $callbackroot MUST point to your server, if you point it to your app.new.facebook.com/APPLICATION, ajax will fail.
$callbackroot='http://[PLACE_YOUR_CALLBACK_URL_HERE]'; // do not add a trailing slash e.g.: http://myserver.domain.com
//AJAX Response (should be first php or in a separate php file):
if (isset($_REQUEST['rate'])) {
//do something and return "ok" if things are fine
echo "ok";
exit; //Important! Stops remaining php after AJAX request is processed
}

//what ever apicall you use to authenticate, this one is from smiley: http://svn.facebook.com/svnroot/platform/samples/packages/smiley.tar.gz
$fb = get_fb();
$user = $fb->require_login();

?>


[/sourcecode]

A how-to and the rate.css are located at http://forum.developers.facebook.com/viewtopic.php?id=22547