To access an iframe Facebook application’s context enter
cd(frames); into your Firebug console. This will work on both Canvas and Tab applications.
UPDATE – 2011/06/13: It appears that Facebook has modified their code. You now have to enter
cd(frames);, instead of
cd(frames);, to access the appropriate frame within Firebug.