I make share buttons for my web page and my domain can be changed some times, that's why, I can't use static domain names in my links. The querstuion is: How can I create my share links, that should work on all domains? share links like that:
<li><a href="https://www.linkedin.com/cws/share?url=http://MYPAGE.com" target="_blank"><img src="img/1.png" alt="linkedin"></a></li>
<li><a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2MYPAGE.com" target="_blank"><img src="img/2.png" alt="facebook"></a></li>
i guess this would help
this will make a variable named site_url with your site address no matter what the domain was.. then you can simply trigger the share button with it like that
hope it help .. thanks