Twitter API: Space Character gets changed to 2520 when Tweet is liked

Last Reply on Dec 12, 2012 04:09 AM By Mudassar

Posted on Dec 12, 2012 04:08 AM

I have a url http://www.abc.com/Colors/View Catalogues . when i click on Like tweet then it is changed into http://www.abc.com/Colors/View%2520Catalogues. Except Tweet Like i have no problem. In others it is changed into http://www.abc.com/Colors/View%20Catalogues. So i don't have any problem. For Twitter Like I am using this Code:

 <a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>  

   <script language="javascript" type="text/javascript">        !function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id; js.src = "//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
} } (document, "script", "twitter-wjs");</script>
 
I have done URL Routing:
 System.Web.Routing.RouteTable.Routes.MapPageRoute("View Catalogues", "Colors/View Catalogues", "~/ViewCatalogues.aspx");
 
Please suggest me what is the solution of this problem
 

 

Posted on Dec 12, 2012 04:09 AM

This is controlled by the Twitter Library and they are converting it. So there is no way to avoid this rather than you remove space from your URL

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html