Open heybenji opened 8 years ago
raaa that's annoying, like dammit facebook we're using react and react-router and you're not going to play nicely with it?
anyway, I think 1 could be doable, I'd need to poke into whether react-router supports that quickly, 2 isn't too hard overall but we'd need to re-implement the navigation menu. that would be the main lift, setting up a quick express server and deployment to Heroku would probs only take an hour or so.
ah seems like hash bang urls are supported in react-router: https://github.com/reactjs/react-router/commit/a89f65c045db76b2947cdba73569946b679bc514 https://github.com/reactjs/react-router/issues/601
ah looks like that commit never made it's way into master.
here's a SO answer that might give us a solution: https://stackoverflow.com/questions/25086832/how-to-stop-in-browser-with-react-router/32122395#32122395
If we could get Google crawling compliance and Facebook sharing in one go, that would be awesome. I don't fully understand the stack overflow thread, but the main thing is we'd need to handle incoming paths in the Google crawling format that my SO link talked about.
I'll have some time this evening to work on this, I can try out the solution in the SO thread.
unfortunately the solution in that SO post isn't compatible with the version of react-router we're using, I'm not exactly sure when it would have worked but it's sourcing files that aren't there anymore :(
I've done some searching and can't really find an easy solution to this. In my mind if it comes down to writing our own history library for react-router (or refactoring to use something other than react-router) we're getting to the point where it would be easier to just throw together a quick nodejs app.
not sure though, @heybenji what are your thoughts?
Soo... downside of not using the pretty react-router stuff... if you share a story URL in Facebook, it just strips the hash entirely out, so you can't share a specific story.
Two solutions:
#!
syntax rather than just#
. See: http://stackoverflow.com/questions/29600877/facebook-share-url-having-hash