New Zenner
- Join Date:
- Sep 2008
- Posts:
- 47
- Plugin Contributions:
- 0
AutoTweet [support]
Didn't work. Still getting invalid login. I've used my login ID for Twitter and my email. What am I missing guys???
Views: 51,022
New Zenner
Didn't work. Still getting invalid login. I've used my login ID for Twitter and my email. What am I missing guys???
New Zenner
I have no idea where to go on this problem. Gonna take a break cause it's giving me a headache. Feel free to chime in if you have any idea why I keep getting the invalid login error!!
New Zenner
Tried adding Twitter login.....still invalid login. Checked to make sure it was the correct Twitter login and it is. Tried removing it completely...still IL. It loads a generic store url but no direct path to the item nor does it shorten the link.
Guess it isn't meant to be used by MOI!
New Zenner
After a couple of days of driving myself battier with this app....it hit me in the middle of one of my naps.:blink:So I checked and changed and reloaded....I FIXED IT!! :bigups::bigups::clap::clap: I B Bad!! uh huh uh huh!!!:laugh:
It is working like a charm now
New Zenner
great module.
problems for me the url doesn't get shortened and just posts the store home URL.
Can I easily change it to post the real link to the item rather than trying to shorten it?
Can I change the price from US$ to UK£
and finally is there anyway I can make it tweet a product that isn't new? most of my stock is added by CSV file so I don't actually create a new product, if it tweeted everytime I updated a product that would do as I could quickly edit each product and not actually change anything?
Am I a pain? - well yes probably :blush:
Zen Follower
Badvoc:
great module.
problems for me the url doesn't get shortened and just posts the store home URL.
Can I easily change it to post the real link to the item rather than trying to shorten it?
Can I change the price from US$ to UK£
and finally is there anyway I can make it tweet a product that isn't new? most of my stock is added by CSV file so I don't actually create a new product, if it tweeted everytime I updated a product that would do as I could quickly edit each product and not actually change anything?
Am I a pain? - well yes probably :blush:
2.Yes, on line 122 of update_product.php you should see
if ($showprice){ $message .= ' Only $' . $products_price . '.'; }
Just change the 'Only $' to: 'Only £' However, I get conflicting reports on the pound sign working so if it doesnt show for you I would either make it say 'Only ' which will make it read something like:* 'new product only 9.99'*
or
You can spell out pounds so that it would look something like *'new product only 9.99 pounds' *or change the word pounds to 'GBP' or whatever you like by using:
if ($showprice){ $message .= ' Only ' . $products_price . ' pounds.'; }
Yes, move all the code from lines 90 through 157 (where you see the beginning and end of autoTweet) to line 176. This will tweet only when a product is updated (note: hasn't been fully tested but I have heard from the people who have tried it that it works.)
Yes, haha jk. :cool:
Hope that helps
New Zenner
jamielife:
- If you're using autoTweet3, when bitly fails it will automatically use your the real link instead. Check your bitly info, i've never heard of it failing. If you're using another mod that alters your URLs autoTweet wont work with those. If none of that works, then the answer is No, there is no easy way to do this.
I logged into bitly and reset the bit.ly api key and put the new one in the file and that's working great now :clap:
jamielife:
2.Yes, on line 122 of update_product.php you should see
if ($showprice){ $message .= ' Only $' . $products_price . '.'; }
> Just change the 'Only $' to: 'Only £' However, I get conflicting reports on the pound sign working so if it doesnt show for you I would either make it say 'Only ' which will make it read something like:* 'new product only 9.99'*
> or
> You can spell out pounds so that it would look something like *'new product only 9.99 pounds' *or change the word pounds to *'GBP'* or whatever you like by using:
> ```php
if ($showprice){ $message .= ' Only ' . $products_price . ' pounds.'; }
using the £ sign gives this error:
Twitter could not be updated: 400 Bad Request: Invalid Unicode value in one or more parameters
To paste the code into twitter yourself use:
and with either having it as just 'only' and/or adding GBP it adds 00 to the end of price so it gets displayed as only 9.9900. or 9.9900GBP. so think I'll just disable the price part and not use it :)
jamielife:
- Yes, move all the code from lines 90 through 157 (where you see the beginning and end of autoTweet) to line 176. This will tweet only when a product is updated (note: hasn't been fully tested but I have heard from the people who have tried it that it works.)
worked a treat, thanks for your time :hug:
New Zenner
on a side note the same problem happens with price on autofacebook - add £ no £ shows and 00 appears at end of price
New Zenner
Ok i've installed this and get no errors...
well, no error messages!
basically i add a product and the screen goes blank when i click to add.
if i remove the twitter folder then i can add products fine... re add the twitter folder and the cart messes up... so something is wrong.
if i click to go back then it sayd the product is in the catagory but it doesnt show up, and nothing gets posted to twitter...
New Zenner
I am getting this error
Twitter could not be updated: 401 Unauthorized: Invalid / used nonce
To paste the code into twitter yourself use:
Anyone have any idea why?
Zen Follower
Jamie...luv you for a such a great addon...:clap:
One little tiny fix if you can?
1980's is showing up 1980\s.
Is this possible to fix this?
Inactive
Installed and posted new product, received this error:
Twitter could not be updated: 401 Unauthorized: Incorrect signature
Zen Follower
Jamie, are you around?
I need your help...please :blink:
Zen Follower
Here's the code for AutoTweet
$prodUrl = urlencode(zen_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id));
//short url function.
function shortenUrl($user, $key, $shortenUrl){
$url = 'http://api.bit.ly/v3/shorten?login=' . $user .'&apiKey='. $key . '&longUrl=' . $shortenUrl . '&format=xml';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
//use oAuth library
require_once 'twitteroauth/twitteroauth.php';
//function to shorten url
$shorten = shortenUrl($bitlyUsername, $bitApiKey, $prodUrl);
//start message w/ or w/out price
$message = "New product available: " . $_POST['products_name'][$_SESSION['languages_id']] . '!';
if ($showprice){ $message .= ' Only $' . $products_price . '.'; }
//if shorten fails use $storeUrl
$bitStatus = simplexml_load_string($shorten);
$http_code = $bitStatus->status_code;
$status_txt = $bitStatus->status_txt;
if ($http_code != 200){$shorten = $storeUrl;
$biterror = "URL was not shortened for Twitter: ";
$biterror .= $storeUrl . " was used instead.";
$biterror .= " Reason: " . $status_txt;
$messageStack->add_session($biterror, 'caution');
} else { $shorten = $bitStatus->data->url;}
//finish message.
$message .= ' Check it out now at ' . $shorten;
//the connection to twitter API
$connection = new TwitterOAuth($consumerKey, $consumerSecret, $oauthToken, $oauthTokenSecret);
$connection->timeout = $timeout;
$connection->connecttimeout = $timeout;
//send message
$tweet = $connection->post('statuses/update', array('status' => $message));
//error check
if ($connection->http_code != NULL){
if ($connection->http_code != 200){
$error = "Twitter could not be updated: " . $connection->http_header["status"] . ": ";
$error .= $tweet->error;
$error .= "<br />To paste the code into twitter yourself use: <br />" . $message;
$messageStack->add_session($error, 'error');
} else {
$messageStack->add_session('Twitter Updated!', 'success');
}
} else {
$error = "Twitter could not be updated: Could not connect or there was nothing to do once connected.<br />
Twitter may be down or over capacity. To paste the code into twitter yourself use: <br />";
$messageStack->add_session($error, 'error');
$messageStack->add_session($message, 'caution');
}
I am having a problem with the Title coming out
1960\s instead of 1960's
How do I fix this? :cry:
Thanks
Zen Follower
i face a problem:
Twitter could not be updated: 401 Unauthorized: Incorrect signature
To paste the code into twitter yourself use:
New product available: 2010 End Offer sms @ 2 paisa! Only $4000. Check it out now at http://bit.ly/dSKuPE
i use:
zencard latest version and autotweet latest version.
Zen Follower
how to change currency, i use indian rupees in my zencart but this is used USD ($)
how to change ?
New Zenner
Hi,
I have a problem with auto tweet. I currently have zen cart 1.3.9h and after installing and configuring auto tweet, when I add a product, it appears a page not found and if I click refresh it tells me that the product seemed empty.
Thanks in advance for your responses.
New Zenner
Solved it.
It was a setting from bit.ly. Share Settings and untick "Warn me if I try to share a message without a link or with only links."
Totally Zenned
Hi,
Thanks for this great mod. It works fine on new created products, however, we often use copy to create new products. If we copy a product it isn't send to twitter. is there a solution for this?
Totally Zenned
Problem solved :clap:
I copied all the stuff between start autoTweet 3.0 and eof autotweet to some rule below (see part of code)
$sql_data_array = array_merge($sql_data_array, $update_sql_data);
zen_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
// reset products_price_sorter for searches etc.
zen_update_products_price_sorter((int)$products_id);
///////////////////////////////////////////////////////
//// INSERT PRODUCT-TYPE-SPECIFIC *UPDATES* HERE //////
// start autoTweet 3.0
//User Settings.
$consumerKey = "xxxxxx"; //twitter app consumer key.
$consumerSecret = "xxxxxx"; //twitter app consumer secret.
$oauthToken = "xxxxxx"; //twitter app "my access" token
$oauthTokenSecret = "xxxxxx"; //twitter app "my access" token secret.
$bitlyUsername = "xxxxx"; //bit.ly username
$bitApiKey = "xxxxx"; //bit.ly api key.
$storeUrl = "xxxxx"; //url to the homepage of your store.
$showprice = 0; // Show the product price? 0 = off, 1 = on. no quotes.
Tell staff why this post should be reviewed.