Firstly, are you sure facebook is hitting the wrong URL, or is your site redirecting to http://dev.domainname.com/index/testApplication123/? Set up an HTTP sniffer and follow the authentication process to confirm. I’m pretty certain the facebook site just does a javascript redirect back to yours with an extra query string.
From what I remember with facebook is you set up a default redirect URL for your app, but you can also override it at the time a user is verifying their account when you request the access tokens.
Do you know which you are doing?
Thanks!
~Brad