Tweet button


Hi, im trying to add a tweet button for my website and i’m having some issues i cant figured out… everything works fine but when the url gets encode because in the search we add some parameters with accent characters we are getting an error… here’s an example:

With this url everything works fine.

With this url the tweet button doenst appear, it just comes the text “tweet”

Im using this code:


I also have a follow button that had the same issue and i changed it for the iframe version and is working fine tough, here’s the code:

This code works like a charm with every url “encode or not encode”, what i need is to make the tweet button to work with any url encode or not encode cuz the website is in spanish and got some accents characters. Thanks in advance for any help i could get here.


Can you verify the code you are using to generate the tweet button?


This should automatically escape your source url.


I’m having the same problem, some of my pages have the city name in the url, if the city name has an accent in it, it gets encoded in the url, example:�al

Where Montr%E9al is Montréal encoded.

On every page that has an accented character in the url, the Tweet button fails to load and just shows the text “Tweet”

If I change the url to: (replace “%E9” with “e”)
The button loads perfectly, count and all.

The code I’m using, it remains the same for both urls posted above:


I’ve tried many configurations, all with the same result. Any help with this would be much appreciated.

Thank you,



I tried using the AddThis button (with the Twitter button) instead, and I get the same result, this leads me to believe that there may be an issue with the Twitter button.

Any help would be much appreciated.


I just fixed this on the website I am currently working on. For some reason, after trying random encodings, the encodeURIComponent JS function works.


Thanks. It resolved my ajax call issue.


Thanks. It resolved my ajax call issue.