Tweet button


#1

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:

http://localhost:8888/gdv2012/detail_clas.php?category=cat3&id=4
With this url everything works fine.

http://localhost:8888/gdv2012/detail_clas.php?category=cat3&estado=Anzo�tegui&id=3
With this url the tweet button doenst appear, it just comes the text “tweet”

Im using this code:

Tweet

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.


#2

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

Tweet

This should automatically escape your source url.


#3

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:
http://www.essencemontreal.com/prices.php?l=e&prov=QC&city=Montr�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”)
http://www.essencemontreal.com/prices.php?l=e&prov=QC&city=Montreal
The button loads perfectly, count and all.

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

Tweet

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

Thank you,

Chris


#4

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.


#5

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


#6

Thanks. It resolved my ajax call issue.


#7

Thanks. It resolved my ajax call issue.


#8