I am not sure that I can understand your requirements. From my understanding you are placing http://localhost/ in Website - Site URL settings in the Facebook Apps Settings portal. This should work. Note that the login workflow will not work in the AppBuilder web client simulator.
Since I am not very familiar with the FB JS SDK and this is not a known issue on our side - could share a runnable project and additional details that will be helpful for reproducing the issue?
In addition, if you are using the FB JS SDK in a hybrid mobile app, I'd recommend that you refer to this forum thread
with a Cordova plugin and a sample that implements a native behavior in a hybrid app. Generally, using the native FB SDKs in a hybrid app with the helpf of the plugin is the recommended approach.
Let me know if you have questions.