This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////Reply/Thread//////////////////////////////////////////////////////// | |
if (IdInResponseTo == 0 || IdInResponseTo == null) { //If no reply is provided... | |
console.log("No reply ID provided."); //log no reply | |
} else { //If Reply (or thread) is set up... | |
var ReplyId = IdInResponseTo; //variable for replies, passed to .sendTweet | |
console.log("In response to: " + ReplyId) //log response to | |
params.in_reply_to_status_id = ReplyId; //send with reply | |
params.auto_populate_reply_metadata = true; //auto-mentions previous user (for thread) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendTweet(TweetText, IdInResponseTo, ImageAttachURL){ | |
//////////////////////////Set Variables/////////////////////////////////////////////////////// | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); //spreadsheet | |
var logsheet = ss.getSheetByName("TweetLog"); | |
var lastRow = Math.max(logsheet.getLastRow(),1) + 1; | |
var twitterKeys= { //Twitter Authentication Tokens to pass through props | |
TWITTER_CONSUMER_KEY: "[YOUR KEY HERE]", | |
TWITTER_CONSUMER_SECRET: "[YOUR SECRET HERE]", | |
TWITTER_ACCESS_TOKEN: "[YOUR TOKEN HERE]", | |
TWITTER_ACCESS_SECRET: "[YOUR SECRET HERE]" |
NewerOlder