How to create a short url for sharing on social media <p>I'm trying to write some code which shares a page on Facebook and twitter. The problem I'm facing is that the page I'm trying to share has a big query string like:</p> <pre><code>http://domain.com/see.php?c=3&amp;a=123&amp;v=1 </code></pre> <p>But it seems that Facebook and Twitter don't like that big query string.</p> <p>I also tried using tiny url with following method in which I passed the URL to a PHP function to get the tiny URL:</p> <pre><code>var a = $("#Link").val(); </code></pre> <p>I get the correct value of <code>**a**</code>. After that I pass this value to a PHP file:</p> <pre><code>$.post("ShortLink.php?value="+a </code></pre> <p>In that PHP file I got the following value:</p> <pre><code>http://domain.com/see.php?c=3 </code></pre> <p>All the values after <code>3</code> is deleted.</p> <p>Thanks</p>