Facebook does that because they know your app's url since you have to add fb[APPID] url where [APPID] is your Facebook app ID.
There is this idea for a specification that handles what you want: http://x-callback-url.com but in order to use it, both apps would have to support it.
Using x-callback-url’s source apps can launch other apps passing data and context information, and also provide parameters instructing the target app to return data and control back to the source app after executing an action.