I am working on a project on https://discoverquran.com/, I would like to share a link on whatsApp e.g https://discoverquran.com/common-questions-about-islam#what-is-the-significant-of-fasting.
but on whatsApp the text after # is not displayed. Is there any solution to it.
I am using the following to share on whatsApp
https://wa.me/?text=https://discoverquran.com/common-questions-about-islam#what-is-the-significant-of-fasting
There is a simple solution, whenever you want to pass a string as a GET Request which inculde space, or any special character then you have to encode it, you can use UrlEncoder or a php function urlencode() or javascript function encodeURI().
So your URL become https://api.whatsapp.com/send/?text=https%3A%2F%2Fdiscoverquran.com%2Fcommon-questions-about-islam%23what-is-the-significant-of-fasting