Using a Google Sheet with Twitter App

I've got a Google Sheet to send messages via Twitter, I have created my app in Twitter, and used the consumer and secret key, if I set it up with no callback url, I get an error telling me that it is not compatible with a desktop app.

And if I enter a placeholder callback URL, I get the following error:

ERROR: Error starting OAuth flow: Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings

What should I be using as the Callback URL?

This is the code:

function help_() {
  var html = HtmlService.createHtmlOutputFromFile('help')
  .setTitle("Google Scripts Support")
  var ss = SpreadsheetApp.getActive();;

function promo_() {
  var html = HtmlService.createHtmlOutputFromFile('promo')
  .setTitle("Twitter Merge Complete")
  var ss = SpreadsheetApp.getActive();;

function getTwitterService_() {

  var consumer_key = "xxxxxxxxxxxxxxxxxxxx";
  var consumer_secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx";

  return OAuth1.createService('twitter')


function twitter(request) {
  var twitterService = getTwitterService_();
  var isAuthorized = twitterService.handleCallback(request);
  if (isAuthorized) {
    return HtmlService.createHtmlOutput('<br><p style="text-align:center">Success! Your Twitter account is now authorized. Please close this window.</p>');
  } else {
    return HtmlService.createHtmlOutput('<br><p style="text-align:center">Ah! there was an error. Please contact Amit Agarwal for support (or tweet @labnol)</p>');

function clearService(){

function encodeString_(q) {

    var str = encodeURIComponent(q
        .replace(/&(gt|lt|amp);/g, function(str, code) {
            var lookup = {
                gt: ">",
                lt: "<",
                amp: "&"
            return lookup[code];
        })).replace(/[()\[\]!*']/g, function(badchar) {
        return "%" + badchar.charCodeAt(0).toString(16);
    return str;  

  // return encodeURIComponent(q).replace(/\!/g, "%21").replace(/\*/g, "%2A").replace(/\'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29");


function doProperty_(key, value) {

  var properties = PropertiesService.getUserProperties();

  if (value) {
    properties.setProperty(key, value);
  } else {
    return properties.getProperty(key) || "";


function onOpen() {

  var menu, ss = SpreadsheetApp.getActiveSpreadsheet();

  menu = [
    { name: "1. Authorize Twitter", functionName: "authTwitter_"},
    { name: "2. Configure Tweets",  functionName: "configTwitter_"},
    { name: "3. Send Tweets",  functionName: "sendTweets_"},
    { name: "Help & Support",   functionName:  "help_"},

    ss.addMenu("🐤  Twitter Merge", menu);