Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Story URLs shared on Facebook strip the hash string #88

Open
heybenji opened this issue Mar 16, 2016 · 8 comments · May be fixed by #91
Open

Story URLs shared on Facebook strip the hash string #88

heybenji opened this issue Mar 16, 2016 · 8 comments · May be fixed by #91

Comments

@heybenji
Copy link
Member

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:

  1. Easier: Use hashbang #! syntax rather than just #. See: http://stackoverflow.com/questions/29600877/facebook-share-url-having-hash
  2. Harder: Set up a server and do routing right
@alicewriteswrongs
Copy link
Contributor

raaa that's annoying, like dammit facebook we're using react and react-router and you're not going to play nicely with it?

@alicewriteswrongs
Copy link
Contributor

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.

@alicewriteswrongs
Copy link
Contributor

ah seems like hash bang urls are supported in react-router:
remix-run/react-router@a89f65c
remix-run/react-router#601

@alicewriteswrongs
Copy link
Contributor

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

@heybenji
Copy link
Member Author

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.

@alicewriteswrongs
Copy link
Contributor

I'll have some time this evening to work on this, I can try out the solution in the SO thread.

@alicewriteswrongs
Copy link
Contributor

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 :(

@alicewriteswrongs
Copy link
Contributor

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?

@alicewriteswrongs alicewriteswrongs linked a pull request Apr 9, 2016 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants