It actually sounds pretty straight at me. You have URLs, as usual, using hash (#), you can retrieve information both on the client side and on the server side.
There is only one thing that is missing on the server side, before you return the content, check the user agent string and compare it with facebook bot (if I'm not mistaken, this is something like "facebookexternalhit"), if it turns out to be facebook bot, and then returns what you need, which describes the URL for the similar / generic (metadata public metadata), and if any other line of the user agent returns the content as usual.
source share