Actually, in that file the {s-url} variable is read. I found out that the function that calls bit.ly is actually in wp-socializer/includes/wpsr-socialbuttons.php
I found that if I change the line (in the function wpsr_get_shorturl($url) ):
- Code: Select all
$url = 'http://api.bit.ly/v3/shorten?login=' . $username . '&apiKey=' . $apikey . '&uri=' . urlencode($url) . '&format=' . $format;
into
- Code: Select all
$url = 'http://api.bit.ly/v3/shorten?login=' . $username . '&apiKey=' . $apikey . '&format=txt&uri=' . urlencode($url);
the shortened URL from bit.ly is successfully used with the 16px twitter button. It seems that there was a problem in the format setting.
Now I hope that I can find out how to let the Twitter button (with the count) also use the shortened url from bit.ly. It now always uses the full url.