Zen Cart Logo
Forums / All Other Contributions/Addons / AutoTweet [support]

AutoTweet [support]

Views: 51,022

Results 1 to 20 of 264
13 Feb 2010, 5:00 AM
#1
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

AutoTweet [support]

Figured I'd go head and start a thread for the AutoTweet mod I uploaded that was recently made available at http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1523.

This simply auto updates your twitter followers everytime you add a product. The product name and shortened (bit.ly) link to the product are automatically tweeted without you ever having to leave the zencart admin. It also offers link tracking stats as well (through bit.ly).

*Note: you will need to have Curl installed.
*You will also need a free bit.ly api key (though this is optional).
*More info available in readme.
*Also I forgot to mention it in the readme, but this mod is shared under GPL licensing terms. Do whatever you want with it. :smile:

***Remember always backup your files before installing anything.

14 Feb 2010, 11:04 PM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: AutoTweet [support]

Thanks for a great mod. Installation was simple and went without glitch. Useful tracking stats on Bit.ly

15 Feb 2010, 12:35 AM
#3
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

Good, glad you liked it.

20 Feb 2010, 1:17 AM
#4
dgarrett20 avatar

dgarrett20

New Zenner

Join Date:
May 2009
Posts:
26
Plugin Contributions:
0

Re: AutoTweet [support]

I get the following after adding a product:

Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/knivdavi/public_html/adminfolder/twitter/twitter.php on line 56

20 Feb 2010, 1:26 AM
#5
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

what version of PHP are you running?

20 Feb 2010, 1:37 AM
#6
dgarrett20 avatar

dgarrett20

New Zenner

Join Date:
May 2009
Posts:
26
Plugin Contributions:
0

Re: AutoTweet [support]

It's 1.3.8a

20 Feb 2010, 2:01 AM
#7
dgarrett20 avatar

dgarrett20

New Zenner

Join Date:
May 2009
Posts:
26
Plugin Contributions:
0

Re: AutoTweet [support]

It is still adding the products to my zencart, but gives the error and doesn't add them to twitter

20 Feb 2010, 2:20 AM
#8
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

yeah thats because twitter.php is set to be 'included' and not 'required.' Your server is probably currently running version 4.x of php. Do you have the ability to upgrade? Who is your hosting through? Most of the major hosting providers (Godaddy, ipower, gator, etc) have some form of 5 running. Sometimes you can switch between version 4 and 5.

20 Feb 2010, 2:22 AM
#9
dgarrett20 avatar

dgarrett20

New Zenner

Join Date:
May 2009
Posts:
26
Plugin Contributions:
0

Re: AutoTweet [support]

4.4.6 - I use 2by2host - I'll ask them about changing it.

20 Feb 2010, 2:34 AM
#10
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

Yeah i looked through their site, they list ' php4/php5' as one of their features. Couldnt find how to switch between the two but they have live chat so that will probably help. Afterwards everything should work fine.

20 Feb 2010, 4:35 AM
#11
dgarrett20 avatar

dgarrett20

New Zenner

Join Date:
May 2009
Posts:
26
Plugin Contributions:
0

Re: AutoTweet [support]

Changed to PHP 5. It's working. Great mod. Thanks!

20 Feb 2010, 4:42 AM
#12
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

Good, glad to hear it. Sorry I hadnt realized the php 4 thing sooner.

23 Feb 2010, 12:25 PM
#13
cobussound avatar

cobussound

New Zenner

Join Date:
Feb 2010
Posts:
1
Plugin Contributions:
0

Re: AutoTweet [support]

Hi, I have installed the autotweet mod after changing the update_product.php file but get the following errors:

Warning: curl_setopt_array() [function.curl-setopt-array]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /usr/www/users/soundoa/admin/twitter/bitly.php on line 141
{ "errorCode": 0, "errorMessage": "", "results": { "http://www.soundonline.co.za/index.php?main_page=product_info&cPath=93&products_id=427": { "hash": "cxFYvi", "shortCNAMEUrl": "http://bit.ly/9UmxW9", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/9UmxW9", "userHash": "9UmxW9" } }, "statusCode": "OK" }
Fatal error: Uncaught exception 'BitlyException' with message 'Invalid JSON-response' in /usr/www/users/soundoa/admin/twitter/bitly.php:196 Stack trace: #0 /usr/www/users/soundoa/admin/twitter/bitly.php(382): Bitly->doCall('shorten', Array) #1 /usr/www/users/soundoa/admin/includes/modules/update_product.php(146): Bitly->shorten('http://www.soun...') #2 /usr/www/users/soundoa/admin/product.php(62): require('/usr/www/users/...') #3 {main} thrown in /usr/www/users/soundoa/admin/twitter/bitly.php on line 196

I have PHP5 and cURL enabled.

I have no idea how to fix this. Please help.

23 Feb 2010, 3:31 PM
#14
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

I'm looking into this. In the meantime;

  1. Make sure your host's PHP configuration in not in safe mode (php.ini).
  2. Is open_basedir set to correct directories?

You make have to contact your hosting co. to verify.

23 Feb 2010, 3:42 PM
#15
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

It looks like CURLOPT_FOLLOWLOCATION doesn't work with open_basedir on. Your host may have to turn this off

23 Feb 2010, 4:29 PM
#16
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

fixed this.
You have to edit both bitly.php and twitter.php

on line 133 bitly.php and line 158 of twitter.php comment out

$options[CURLOPT_FOLLOWLOCATION] = true; 

so that it looks like:

//$options[CURLOPT_FOLLOWLOCATION] = true; 

then somewhere around line 136 on bitly.php and line 161 on twitter.php add:

if ( ini_get('open_basedir') == '' ) {
$options[CURLOPT_FOLLOWLOCATION] = true;
}

Everything should work fine. (at least it did on my local machine)

24 Feb 2010, 3:05 PM
#17
michaelsen avatar

michaelsen

New Zenner

Join Date:
Feb 2010
Posts:
2
Plugin Contributions:
0

Re: AutoTweet [support]

I have used your mod for an oscommerce shop by inserting the twitter code from update_product.php into the same place in osc's categories.php

When using your default code:

include 'twitter/twitter.php';
require_once 'twitter/bitly.php';

it's posting fine to twitter, but I'm getting this error after adding the new product:

Fatal error: Cannot redeclare class TwitterException in /home/account/public_html/admin/twitter/twitter.php on line 1867

If I use this code instead (or require_once for both):

include_once 'twitter/twitter.php';
require_once 'twitter/bitly.php';

then I am not getting the error but my twitter post is missing the product name:

New Product Available: "" Check it out at http://bit.ly/xxxxx

Do you have any ideas what is causing this?

24 Feb 2010, 4:20 PM
#18
michaelsen avatar

michaelsen

New Zenner

Join Date:
Feb 2010
Posts:
2
Plugin Contributions:
0

Re: AutoTweet [support]

I fixed it by adding if ($language_id == 1){} around the code in categories.php so it only included the code for english.

Thanks for a great mod!

24 Feb 2010, 11:18 PM
#19
jamielife avatar

jamielife

Zen Follower

Join Date:
Dec 2009
Location:
Richmond, VA
Posts:
161
Plugin Contributions:
0

Re: AutoTweet [support]

Oh, good catch, and thanks I'm glad you like it.

28 Feb 2010, 6:49 AM
#20
heavendreams avatar

heavendreams

New Zenner

Join Date:
Dec 2009
Posts:
7
Plugin Contributions:
0

Re: AutoTweet [support]

I've installed the Autotwitter, but I can't figure out, why it doesn't work by me.
When I set up a new product, it always shows me a blanc site, and nothing happend, and the new product is not inserted.

I use Zen Cart 1.38, PHP 5, I've set the safe mode off .

Hugs Micki