Facebook connect and test environments

I am developing a java-based web application (actually several applications that use a shared code base) and it has come down from on high that we want to add facebook connect to our enrollment page for the purposes of gathering info about the user (we don’t use their FB credentials to log in). Our environments have a business tier and a web tier as well as a db tier and we have one for dev, two for qa and one for production. Normally, I test by launching tomcat, pointing at the desired environment and using localhost. Apparently, I cannot use that and use FB connect. Someone at our company set up a FB app using a URL called labs.mycompany.com. He also set up an app called www.therealurl.com. We also have a configuration file that stores the app id (which will be different for the different apps we make). As I understand it, I have to set up my /etc/hosts file to make labs.mycompany.com map to 127.0.0.1 and use that host name if I want to connect to facebook. Is that always the case? It is kind of a pain in the ass for me since if need to look at the production web site, I have to go in and edit my /etc/hosts file.

Another problem that I have is that the qa environments are reached by pointing at www.therealurl.com.qa1. Setting up the code to use the app id for www.therealurl.com won’t work. I suppose I could ask our extremely overworked ops guy to make the url be qa1.therealurl.com to support this new requirement, but he might say no.

Is there any way around this problem of having to use different urls than I normally would?

Thanks,
Rob

P.S. for extra credit, what is the status of fb: tags in the html. I see that used a lot in examples, but I remember reading that fbml tags are now considered legacy.

Here is where you can go for facebook programming help:

Do you have access to the facebook app? If not, you should request the person who is the admin to add you as an admin.

Just last week facebook’s developer blog announced Support for Multiple Domains in the Developer App. You may be able to just add the additional domain(s).

For any “facebook connect” functionality on a single domain - you only need one facebook app for the live site, but for testing - it can be handy to have a separate app on facebook pointing to your localhost and switch appid and secret key when you push live.