Viewing 12 posts - 1 through 12 (of 12 total)
    • Author
      Posts
    • peppelin
      Guest

      Hi,

      I’ve been using wp spocializer and works like a cham.

      The only thing I found not working as intended is the 16px twitter. It opens a non valid url , in my case:

      Code:

      http://twitter.com/home?status=Los+emprendedores+cambiar%C3%A1n+el+mundo%20-%20{

      I haven’t changed any code, so, where can I modify it?

      The reason is, the link contains the “{” character. Twitter blocks links containing that character.

      Try changing the Page URL. Its not a fault with WP Socializer.

      Anonymous
      Guest

      I have the same issue and have been digging into the problem. The issue happens when I add my bit.ly username and api-key in the WP Socializer settings. Without it, it works well but it sends the full page url to twitter instead of shortened url. I also tested it out be removing the {s-url} variable in wp-socializer/wp-socializer.php into {url} variable. It seems that something goes wrong with getting the shortened url from bit.ly. In my bit.ly account, I see all the shortened urls that have been requested, but somehow they don’t get back correctly in the {s-url} variable.

      I hope you have a solution for this.

      The best idea is to avoid characters like {, } etc in links. Not only twitter, even many other websites avoid that.

      Anonymous
      Guest

      But those characters are not in the link at all !

      I have a simple link like http://www.markvansetten.nl?p=205 or http://www.markvansetten.nl/en/2012/03/08/end-to-loneliness-demo/

      When entering my bit.ly username and API key in the settings of your plugin, than something goes wrong, presumably with the short url returned from bit.ly (which according to your script should be in the {s-url} variable. It seems that there is something wrong with this variable and the script uses the { from that variable, instead of the value in that variable.

      Strange… I checked the code, it works fine. Did you find the bug there ??

      Anonymous
      Guest

      If I replace the {s-url} variable with the {url} variable it all works fine (except that it is not using the bit.ly shortened URL). This indicates to me that something is going wrong with the {s-url} variable. What I don’t know as I haven’t been able to locate the code where you call the bit.ly to retrieve the shortened URL and where you set the {s-url} variable. I was hoping you could find the bug there.

      Anonymous
      Guest

      msetten and vaakash, thanks to both of you.

      As msetten said, replacing {s-url} with {url} solved the problem.

      Thanks again!

      Anonymous
      Guest

      peppelin wrote:

      msetten and vaakash, thanks to both of you.

      As msetten said, replacing {s-url} with {url} solved the problem.

      Thanks again!

      It doesn’t actually solve the issue, it is just a workaround. With {url} the shortened bit.ly link are not used in the Twitter message but the full length link. This can make a message too long.

      Anonymous
      Guest

      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.

      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.

      Anonymous
      Guest

      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:

      $url = ‘http://api.bit.ly/v3/shorten?login=’ . $username . ‘&apiKey=’ . $apikey . ‘&uri=’ . urlencode($url) . ‘&format=’ . $format;


      into

      Code:

      $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.

    Viewing 12 posts - 1 through 12 (of 12 total)
    • The topic ‘Social 16px twitter not working’ is closed to new replies.

    Subscribe for updates

    Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter