views:

81

answers:

2

I am passing this url

http://new.wadja.com/petty01#bad religion

to twitter button and I receive 'url' parameter does not contain a valid URL.

Below I have an example of my tweet button

-- hmm...stack-overflow is not displaying the frame below anyway

-- end of frame

Any ideas? I am using URL encode in js.

Thanks in advance.

A: 

Try http://new.wadja.com/petty01#bad%20religion. Plain spaces in URLs must be encoded.

Frédéric Hamidi
Already did-no luck. This is how I am passing it right now http%3A%2F%2Fnew.wadja.com%2Fpetty01%23Bad%20Religion
Argyris
That URL is indeed invalid. You should not encode the colon, the slashes and the hash sign.
Frédéric Hamidi
+1  A: 

OK found the solution using the code from this site http://www.albionresearch.com/misc/urlencode.php. I am replacing spaces with + instead of %20 and it works fine.

Argyris