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

AutoTweet [support]

Views: 51,022

Results 21 to 40 of 264
28 Feb 2010, 7:54 AM
#21
heavendreams avatar

heavendreams

New Zenner

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

AutoTweet [support]

Ok, I've forgotten to say, that my zen cart runs with two languages, and the default language is German.

Now I've seen, that something happens:
The product has been inserted only in English, in the english admin interface it can bee seen, and give attributes, but not in the German admin interface.

But nevertheless, it has been not forwarded to twitter.

28 Feb 2010, 5:45 PM
#22
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

Hi
Plz help, I installed this module as instructed , now on step 4, it says
4. Testing Instructions/Additional changes:

Don’t test additional changes in upload_product.php.

Errors can cause multiple “Ghost” products to be added that aren’t removable without deleting the category.

You could create a new category and only add products to it for test. when youre done just delete the category. This will however throw off your category and product numbers and is not advisable if you don't know what you're doing.

So to be safe: If you wan’t to change anything else or if you just want to make sure everything is right before going live.

Upload everything as instructed above,

copy lines 128 – 149 from upload_product.php,

create a test file (i.e. testfile.php) with lines 128 - 149 pasted in.

Be sure to add <?php and ?> at the beginning and end of the pasted code.

Upload to store/admin/

And test at http://www.yourstore.com/store/admin/testfile.php

where is upload_product.php file ????

i have added new prodcuts to existing categories in routine but i do not see any thing happening on twitter site ?

Regards

28 Feb 2010, 6:12 PM
#23
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

Hi

When i try to add the products i get this error now

Fatal error: Uncaught exception 'BitlyException' with message 'Invalid headers (403)' in /home/pcitshop/public_html/admin/twitter/bitly.php:177 Stack trace: #0 /home/pcitshop/public_html/admin/twitter/bitly.php(382): Bitly->doCall('shorten', Array) #1 /home/pcitshop/public_html/admin/includes/modules/update_product.php(146): Bitly->shorten('http://www.pcit...') #2 /home/pcitshop/public_html/admin/product.php(62): require('/home/pcitshop/...') #3 {main} thrown in /home/pcitshop/public_html/admin/twitter/bitly.php on line 177

plz help?
Regards

2 Mar 2010, 9:00 AM
#24
jamielife avatar

jamielife

Zen Follower

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

Re: AutoTweet [support]

@heavendreams - only english is supported right now. there is a fix in this thanks to michaelsen here but it should only stop errors in other languages and I havent tested it.

@omerhanif - step 4 is optional. If your having problems simple reinstall and don't complete step 4.

2 Mar 2010, 10:46 AM
#25
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

michaelsen:

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!

Hi

There are 3 categories.php, which one i need to change and which codes plz?

Regards

3 Mar 2010, 1:57 PM
#26
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

plz help, its not working ?

4 Mar 2010, 1:48 PM
#27
jamielife avatar

jamielife

Zen Follower

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

Re: AutoTweet [support]

I'm workin on this problem... in the mean time, undo all the modifications you made.

4 Mar 2010, 3:53 PM
#28
jamielife avatar

jamielife

Zen Follower

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

Re: AutoTweet [support]

ok for carts with mulitple languages that are getting the 'cannot redeclare class' error:

On the included update_product.php in /admin/modules, around line 128 you should see:

// bof Auto Tweet.
include 'twitter/twitter.php';
change it to:
// bof Auto Tweet.
include_once 'twitter/twitter.php';

That should fix the problem.

4 Mar 2010, 4:05 PM
#29
jamielife avatar

jamielife

Zen Follower

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

Re: AutoTweet [support]

omerhanif:

plz help, its not working ?

Download autotweet again.

Complete steps 1 through 3
(Step 4 is optional and does not need to be complete).

You should only edit lines 128 through 148 in the included update_product.php file.

Did you configure update_product.php properly and install in the admin/modules/ folder? Is the twitter folder installed in your admin folder?

If your store has multiple languages see the post immediately above this post.

4 Mar 2010, 6:16 PM
#30
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

I downloaded the autotweet again, completed steps 1 through 3, edited lines 128 through 148 in the included update_product.php file, configured update_product.php properly and install in the admin/includes/modules/ . Twitter folder installed in admin folder, Only language is English, BUT when i try add a product i get same error Fatal error: Uncaught exception 'BitlyException' with message 'Invalid headers (403)' in /home/pcitshop/public_html/admin/twitter/bitly.php:177 Stack trace: #0 /home/pcitshop/public_html/admin/twitter/bitly.php(382): Bitly->doCall('shorten', Array) #1 /home/pcitshop/public_html/admin/includes/modules/update_product.php(146): Bitly->shorten('http://www.pcit...') #2 /home/pcitshop/public_html/admin/product.php(62): require('/home/pcitshop/...') #3 {main} thrown in /home/pcitshop/public_html/admin/twitter/bitly.php on line 177

4 Mar 2010, 6:25 PM
#31
jamielife avatar

jamielife

Zen Follower

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

Re: AutoTweet [support]

hmm i'm looking into it.

and you are running php 5/
and have cURL installed?

4 Mar 2010, 7:07 PM
#32
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

curl
cURL support enabled
cURL Information libcurl/7.19.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

PHP Version 5.2.10

Zen Cart 1.3.8a

4 Mar 2010, 9:59 PM
#33
jamielife avatar

jamielife

Zen Follower

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

Re: AutoTweet [support]

ok lets try this;

Create a new file called: test.php
paste this code in it

<?php $url = "http://www.test.com"; $aParameters['login'] = 'username'; $aParameters['apiKey'] = 'R_f5003d838cfcc1498a0e43'; $aParameters['version'] = '2.0.1'; $queryString = ''; foreach($aParameters as $key => $value) $queryString .= '&'. $key .'='. urlencode(utf8_encode($value)); $queryString = trim($queryString, '&'); $url .= '?'. $queryString; $url = 'http://api.bit.ly/'. $url; $options[CURLOPT_URL] = $url; $options[CURLOPT_PORT] = 80; $options[CURLOPT_FOLLOWLOCATION] = true; $options[CURLOPT_RETURNTRANSFER] = true; $options[CURLOPT_TIMEOUT] = 60; $curl = curl_init(); curl_setopt_array($curl, $options); $response = curl_exec($curl); $headers = curl_getinfo($curl); $errorNumber = curl_errno($curl); $errorMessage = curl_error($curl); curl_close($curl); print_r($headers); ?>

enter your bit.ly username and api key inplace of the ones shown in red.
upload the file to your server.
run it from your browser.

if all goes well, it should spit out an array, showing us what your headers look like.
if not, you should get a similar error, either way let me know what you get.

4 Mar 2010, 10:32 PM
#34
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

Hi Jamie
Thanks for help , here is the result of http://pcitshop.com/test.php

Array ( [url] => http://api.bit.ly/http://www.test.com?login=my user name was here&apiKey=R_my key was here&version=2.0.1 [content_type] => text/html [http_code] => 403 [header_size] => 155 [request_size] => 139 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.131384 [namelookup_time] => 0.009571 [connect_time] => 0.069427 [pretransfer_time] => 0.069431 [size_upload] => 0 [size_download] => 169 [speed_download] => 1286 [speed_upload] => 0 [download_content_length] => 169 [upload_content_length] => -1 [starttransfer_time] => 0.131309 [redirect_time] => 0 )

regards

4 Mar 2010, 11:34 PM
#35
jamielife avatar

jamielife

Zen Follower

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

Re: AutoTweet [support]

You're being blocked.

the [http_code] => 403 means that api.bit.ly is receiving your request but for whatever reason they're denying. I'm not sure why this is happening, they do black list sites but i already checked you're not blacklisted. It's possible that maybe you've reached some sort of limit, but you'd have to be a pretty heavy bit.ly user. more reason 403 errors occur: http://en.wikipedia.org/wiki/HTTP_403

try pasting this url into your browsers address bar:

http://api.bit.ly/shorten?version=2.0.1&longUrl=http://bbc.com&login=username&apiKey=R_f5003d838cf6d2a0e4
``` (obviously change the username and apikey with your bit.ly info)

you should get a string of text with an error code. if it works your error code should be 0 and you should see a shortened url for bbc.com if you get a different message it's probably your IP or your username

You could also try creating a new bitly account just to be safe and seeing if that works.

other than that you could disable the bitly portion of the script. however you run the chance of your tweets being over 140 chars. however you could just have something like "new product available "product name" @ http://pcitshop.com" posted to twitter.

I don't know why else you'd get that code. Sorry, it has to do with the headers being sent for json but that isn't really my area of expertise.
5 Mar 2010, 12:46 AM
#36
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

i got this result from above test you mentioned

{ "errorCode": 0, "errorMessage": "", "results": { "http://bbc.com": { "hash": "5KM2", "shortCNAMEUrl": "http://bit.ly/aET8Me", "shortKeywordUrl": "", "shortUrl": "http://bit.ly/aET8Me", "userHash": "aET8Me" } }, "statusCode": "OK" }

plz let me know what to do next?

Regards

5 Mar 2010, 1:08 AM
#37
jamielife avatar

jamielife

Zen Follower

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

Re: AutoTweet [support]

is json enabled? you can find out by typing:
phpinfo();
into a blank php file and scrolling down to json.

5 Mar 2010, 1:17 AM
#38
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

yes it is

json
json support enabled
json version 1.2.1

5 Mar 2010, 1:21 AM
#39
jamielife avatar

jamielife

Zen Follower

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

Re: AutoTweet [support]

then i'm at a loss.

replace lines 128 through 148 of update_product.php with:

// bof Auto Tweet.
include_once 'twitter/twitter.php';

// CHANGE: path to your store (i.e. http://example.com/store
$myStoreUrl = 'http://pcitshop.com';
// CHANGE: Your stores Twitter username and password
$twitter = new Twitter("username","password");
//build full link to product
$produrl = $myStoreUrl . '/index.php?main_page=product_info&cPath=' . $current_category_id . '&products_id=' . $products_id ;
// send tweet.
$prodname = $sql_data_array['products_name'];
$mytweet = $prodname . ' now available at ' . $produrl;
$twitter->updateStatus($mytweet);
// eof Auto-Tweet

and see if it updates your twitter now. Basically this does the same thing without the link bit.ly shortening should be fine so long as your products name's arent too long.

5 Mar 2010, 1:33 AM
#40
omerhanif avatar

omerhanif

Zen Follower

Join Date:
Aug 2009
Location:
London
Posts:
106
Plugin Contributions:
0

Re: AutoTweet [support]

yes its working now , Thanks for help