When you register a Facebook application you need to provide URL's to your application's site so Facebook knows where to send the user on redirects from logging in, and handle messaging between Facebook and your application.
To handle the case of being able to develop and test on a local server, and deploying to the live server. This is the 'Callback URL' setting in the application setup. This can contain an IP address and port number so for testing locally you can set it to a local IP address. For example, http://127.0.0.1:9000.
Facebook doesn't try to contact this directly, it redirects the browser to it, so this works fine when testing the application locally. You can create two applications, one with the testing Callback URL, and one with the production one, and make this a parameter in your application.
Another option that worked for me was to set the Callback URL to the production domain (in this case, tinyvid.tv) and locally set my hosts file so that tinyvid.tv resolved to localhost. The web server needs to run in port 80 locally for this to work.