Hi everyone!
I’m making script in Google Docs for retweeting tweet with known ID. When code looks like this it wors fine:
try {
var result = UrlFetchApp.fetch(
“https://api.twitter.com/1.1/statuses/retweet/353197875485880320.json”,
requestData);
//var tweets = Utilities.jsonParse(result.getContentText());
//var sheet = SpreadsheetApp.getActiveSpreadsheet();
}
catch (err) {
Logger.log(Utilities.jsonStringify(err));
}
But when I need to set tweet ID it makes error {“errors”:[{“message”:“Sorry, that page does not exist”,“code”:34}]}. Code looks like this (cell A1 has the same string “https://api.twitter.com/1.1/statuses/retweet/353197875485880320.json”):
try {
var result = UrlFetchApp.fetch(
sheet.getRange(“A1”).getValue(),
requestData);
//var tweets = Utilities.jsonParse(result.getContentText());
//var sheet = SpreadsheetApp.getActiveSpreadsheet();
}
catch (err) {
Logger.log(Utilities.jsonStringify(err));
}
What’s the difference??
Thanx in advance
Konstantin