OK. I just spent best part of a day working this out. If you don't have access to the API panel to edit what domains your facebook api allows (and you need to use SSL to fake it out).
Here's what I did:
I am running a node server on my desktop.
You'll need to make sure your node server is already pointing at whatever files you want to run/include in your project. (i.e. if you are not using node to develop, this solution is probably not going to help you).
Make sure you have express and vhost installed. I created a server key and certificate using the command line like this:
openssl genrsa -out myKey.pem
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out myCert.pem
rm csr.pem
I moved the two files into my current node directory where I am running my server instance from.
I created the server instance like this:
var vhost = require('vhost'),
express = require('express'),
vhost: {
'default': 'www.mybigfakeserver.com' // this should match what your api key allows
},
require('https').createServer({
key: fs.readFileSync('myKey.pem'),
cert: fs.readFileSync('myCert.pem')
}, app).listen(443);
Inside your hosts file add whatever you need to fake out. e.g.
127.0.0.1 www.mybigfakeserver.com
This is taken from the facebook api. You will need to add this in your HTML file:
<script>
FB.init({
appId : 'PUT YOUR APP KEY HERE',
version : 'v2.0',
status: true
});
function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script'
, 'facebook-jssdk'));
</script>
Fire up your node server.
Browse to https://www.mybigfakeserver.com
You should see your site. It should now be able to fake out your facebook api into thinking you are running on your regular server that the app was created for.
Go do facebook development without having to deploy all the time.