Home > Forum

Support Forum

Social 16px twitter not working

Discussion forum for WP Socializer plugin

Re: Social 16px twitter not working

Postby vaakash » Thu May 03, 2012 2:50 pm

msetten wrote:Can you tell me where in your code is bit.ly being called and the {s-url} variable set? I have tried to find this myself, but can't find it. I guess there is an error in there somewhere.


Sorry for the late reply. You will find it in the "wp-socializer/wp-socializer.php" file.
User avatar
vaakash
Site Admin
 
Posts: 672
Joined: Sun Jan 17, 2010 11:15 am
Location: India

Re: Social 16px twitter not working

Postby msetten » Thu May 03, 2012 6:06 pm

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.
msetten
 
Posts: 6
Joined: Fri Mar 09, 2012 2:28 pm

Previous

 


  • Related topics
    Replies
    Views
    Last post


Return to WP Socializer

cron


phpBB SEO