breathe-india
breathe-india copied to clipboard
Share button in `Post.svelte` to share a post to twitter
We could use https://developer.twitter.com/en/docs/twitter-for-websites/tweet-button/guides/web-intent What should be the format of the tweet?
Share buttons for Instagram and WhatsApp would also be a good addition.
<thing> available at <location>
<more info>
breathe-india.com/post/<post-id>
<location>
should be a concatenation of state, district, city, spot fields. But there are some issues with that.
See https://github.com/itsfarseen/breathe-india/issues/8
We should skip empty fields among those location subfields.
Currently, as I had put <input required>
for all the fields, the current data contains -
or N/A
to denote unavailable fields.
Consider them too as empty.
Another issue is some of the fields are put as same, for example when both District and City are "Bangalore" we should concatenate it only once.
If you do this, it would be nice if you could port it over to PostRow.svelte
to fix #8
as @gokulsoumya suggested it would be nice if we can add insta and whatsapp too, but if that is not possible a copy to clipboard button would do.
- It's possible to generate
wa.me
links with prefilled text for WhatsApp - https://faq.whatsapp.com/iphone/how-to-link-to-whatsapp-from-a-different-app/?lang=en - I couldn't find anything relating to sharing directly to Instagram
- https://caniuse.com/?search=clipboard - :thinking:
I couldn't find anything relating to sharing directly to Instagram
It seems Instagram doesn't allow sharing from external websites to it's app (makes sense considering it's mainly for sharing photos and videos). IIRC it only allows users with more than 10K followers to directly post a link to their stories (that too from within the app). Forgot about it earlier :P
the clipboard partial support means, if I understand correctly, that we can only copy data to clipboard and not paste from clipboard. Which makes sense because then random websites will be able to monitor our clipboard.