We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin: Tweet This

Development and Programming

Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

I don’t know what to tell you at this point. Didn’t really work with bit.ly before, and doesn’t work now. I still don’t know what version of EE you’re using. If you’re not afraid of PHP, could you change this (appx line 227):

if ($json['errorCode'] == "203") 
    {
      return;
    }
    else
    {
      return $json['results'][$origurl]['shortUrl'];
    }

to this:

echo '<pre>';
    var_dump($json);
    echo '</pre>

<p>’;
      return $json[’results’][$origurl][’shortUrl’];
</pre> and let me know what that looks like? Short of being able to login to your install to take a look, I don’t know that I can offer much more help.

       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah
I don’t know what to tell you at this point. Didn’t really work with bit.ly before, and doesn’t work now. I still don’t know what version of EE you’re using. If you’re not afraid of PHP, could you change this (appx line 227):
if ($json['errorCode'] == "203") 
    {
      return;
    }
    else
    {
      return $json['results'][$origurl]['shortUrl'];
    }
to this:
echo '<pre>';
    var_dump($json);
    echo '</pre>’;
      return $json[’results’][$origurl][’shortUrl’];
</pre> and let me know what that looks like? Short of being able to login to your install to take a look, I don’t know that I can offer much more help.

Thanks for your help. I don’t expect you to spend anymore time on this. By the way, I am on ee 1.6.8 , the latest version 2010021. let me know if you want to take a peak at my server files - again, not expecting anything… thanks!

ps: bit.ly as working fine in the last version for me!

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

If it was working fine in the last version for you, then I’d suggest trying a simplified version of what I posted in the last post.

Change this whole block:

if ($json['errorCode'] == "203") 
    {
      return;
    }
    else
    {
      return $json['results'][$origurl]['shortUrl'];
    }

to this:

return $json['results'][$origurl]['shortUrl'];

That should get you back to where you were before with the bit.ly stuff, without messing with the new hashtags parameter.

       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah
If it was working fine in the last version for you, then I’d suggest trying a simplified version of what I posted in the last post. Change this whole block:
if ($json['errorCode'] == "203") 
    {
      return;
    }
    else
    {
      return $json['results'][$origurl]['shortUrl'];
    }
to this:
return $json['results'][$origurl]['shortUrl'];
That should get you back to where you were before with the bit.ly stuff, without messing with the new hashtags parameter.

tried this option and the one suggested earlier - both don’t work with bit.ly - everything shows correctly in twitter except the shortened title. it is blank. Overall, this works great - shortens and adds the hashtag functionality with is.gd but not bit.ly.

thanks for your help. I will have to research alternate options. or if you have the version before this latest one, I will use that instead.

       
m4thew's avatar
m4thew
21 posts
15 years ago
m4thew's avatar m4thew

Hi All, I’m just trying this plugin out as it’s just what I need.

I also get a blank page if using bit.ly as the short URL. I did edit the file to include my login and API key before uploading to my server. is.gd works fine.

Going to try editing the file as suggested above by mdesign. Update: no joy.

I’m not really too worried about which URL shortener I use but thought it worth reporting.

Thanks very much for the plugin, Mathew.

       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah
Hi All, I’m just trying this plugin out as it’s just what I need. I also get a blank page if using bit.ly as the short URL. I did edit the file to include my login and API key before uploading to my server. is.gd works fine. Going to try editing the file as suggested above by mdesign. Thanks very much for the plugin, Mathew.

Seems there are no plans to fix the bit.ly issue - your only option is to use is.gd. Unfortunately for me, i have to use bit.ly due to several reasons ( using their pro services ). It seems to do exactly what I want but wont work with bit.ly. It used to work with bit.ly for me in the previous version before the fix to add hashtags was added.

let me know if you find a solution.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.
Seems there are no plans to fix the bit.ly issue - your only option is to use is.gd.

How did you come to that conclusion?

The short of it is, I’m not able to replicate this issue locally. Unless I know what the entire content of your template looks like (that would be the template where the plugin code resides), there’s simply no way I can feasibly help. Until someone cares to share the code for their whole template, I’m not sure what else I can do.

       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah
Seems there are no plans to fix the bit.ly issue - your only option is to use is.gd.
How did you come to that conclusion? The short of it is, I’m not able to replicate this issue locally. Unless I know what the entire content of your template looks like (that would be the template where the plugin code resides), there’s simply no way I can feasibly help. Until someone cares to share the code for their whole template, I’m not sure what else I can do.

I can give you access to my CP? …. Will pm you right now. Apologies for the assumption that there was no fix in the works.

       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah
Seems there are no plans to fix the bit.ly issue - your only option is to use is.gd.
How did you come to that conclusion? The short of it is, I’m not able to replicate this issue locally. Unless I know what the entire content of your template looks like (that would be the template where the plugin code resides), there’s simply no way I can feasibly help. Until someone cares to share the code for their whole template, I’m not sure what else I can do.

Just sent you a PM with login details. the relevant site is “blueanalytics” . thx!

       
Ryan M.'s avatar
Ryan M.
1,511 posts
15 years ago
Ryan M.'s avatar Ryan M.

I just cleaned out my PM inbox, which was full. Try PM’ing me again, and this time with the location of your system folder.

       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah
I just cleaned out my PM inbox, which was full. Try PM’ing me again, and this time with the location of your system folder.

Sent. Thanks!

       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah
I just cleaned out my PM inbox, which was full. Try PM’ing me again, and this time with the location of your system folder.
Sent. Thanks!

Hi: Checking in to see to see if you made any progress?

       
plasticated's avatar
plasticated
15 posts
15 years ago
plasticated's avatar plasticated

This works great. I now have bit.ly links working for each of my weblog posts. This was exactly what I was looking for. Thanks for taking the time to share.

       
vacquah's avatar
vacquah
355 posts
15 years ago
vacquah's avatar vacquah
This works great. I now have bit.ly links working for each of my weblog posts. This was exactly what I was looking for. Thanks for taking the time to share.

Checking to see what you did to get bitly to work . still unresolved for me…?

       
plasticated's avatar
plasticated
15 posts
15 years ago
plasticated's avatar plasticated

Just installed as the doc explained. Filled in my API key. Works as expected.

       
First 3 4 5 6

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.