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

Share links with fragment identifiers broken for Twitter/X #7291

Open
TimWeberRE100 opened this issue Oct 18, 2024 · 1 comment
Open

Share links with fragment identifiers broken for Twitter/X #7291

TimWeberRE100 opened this issue Oct 18, 2024 · 1 comment

Comments

@TimWeberRE100
Copy link

Unfortunately it is not possible to post links to twitter/X that contain fragment identifiers (#) because of the way that hashtags work on their website. This means that share links (including shortened share links based on Github Gist) cannot be directly shared to Twitter/X (one workaround is to just use another URL shortening service). Is it feasible to include share links that use a query parameter (?) instead of the #?

@na9da
Copy link
Collaborator

na9da commented Oct 23, 2024

Hi @TimWeberRE100

Not sure if something changed recently on X, but here's an example of a tweet with #share links

https://x.com/SatelliteSci/status/1537308160930639872

One other option is to use the story url feature which is meant to create vanity urls like /story/coolstory.

To do this you need to set the following option in your config.json

"storyRouteUrlPrefix": "https://my-map.com/share/s-"

after that you can access your share URLs like https://my-map.com/story/<short-id>

basically, to resolve /story/short-id, Terria takes the short-id and appends it to the storyRouteUrlPrefix and fetches the share JSON from there.

So an alternate URL for the link in that tweet would be this:
https://maps.dea.ga.gov.au/story/w256tDNTchZcRsoyM2CerdxnDO1

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

No branches or pull requests

2 participants