Problem with sample sketch and Twitter library

I am currently trying to get a sample sketch to work, which comes with the Twitter library by Markku Rossi (for which see: arduino/libraries/Twitter at master · markkurossi/arduino · GitHub), but I am encountering the following error:

no matching function for call to 'Twitter::set_twitter_endpoint(const char*, const char*, IPAddress&, uint16_t&, bool)'

I have been searching around for leads that might help me to understand what causes this error and how it can be solved, but I am out of ideas.

For the sketch I am trying to run, see below. Any ideas that would get me going are warmly welcomed.

/* -*- c++ -*-
 *
 * Twitter.pde
 *
 * Author: Markku Rossi <mtr@iki.fi>
 *
 * Copyright (c) 2011-2012 Markku Rossi
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see
 * <http://www.gnu.org/licenses/>.
 *
 */

#include <SPI.h>
#include <Ethernet.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <sha1.h>
#include <Time.h>
#include <EEPROM.h>
#include <Twitter.h>

/* OneWire bus pin. */
const int busPin = 2;


OneWire bus(busPin);
DallasTemperature sensors(&bus);
DeviceAddress sensor1;
DeviceAddress sensor2;


byte mac[] = 
  {
  0x99, 0x99, 0x99, 0x99, 0x99, 0x99      // dummy MAC-adres Arduino
  };

IPAddress timeServer(999, 999, 999, 9);   // dummy IP-address of Fritz!Box acting as NTP-server

IPAddress ip(999, 999, 999, 99);          // IP-adres of Arduino


/* The IP address to connect to: Twitter or local HTTP proxy. */
IPAddress twitter_ip(199, 59, 149, 232);

uint16_t twitter_port = 80;

unsigned long last_tweet = 0;

#define TWEET_DELTA (60L * 60L)

/* Work buffer for twitter client.  This should be fine for normal
   operations, the biggest items that are stored into the working
   buffer are URL encoded consumer and token secrets and HTTP response
   header lines. */

char buffer[512];

const static char consumer_key[] PROGMEM = "XXX"; // dummy Consumer Key
const static char consumer_secret[] PROGMEM = "XXX"; // dummy Consumer Secret Key

Twitter twitter(buffer, sizeof(buffer));

void
setup()
{
  Serial.begin(9600);
  Serial.println("Arduino Twitter demo");

  sensors.begin();
  if (!sensors.getAddress(sensor1, 0)) 
  {
    Serial.println("DS18B20 NUMBER 1 NOT FOUND!");
  }
  if (!sensors.getAddress(sensor2, 1)) 
  {
    Serial.println("DS18B20 NUMBER 2 NOT FOUND!");
  }

  Ethernet.begin(mac, ip);
  
  twitter.set_twitter_endpoint(PSTR("api.twitter.com"),
                               PSTR("/1/statuses/update.json"),
                               twitter_ip, twitter_port, false);
  twitter.set_client_id(consumer_key, consumer_secret);

#if 1
  /* Read OAuth account identification from EEPROM. */
  twitter.set_account_id(256, 384);
#else
  /* Set OAuth account identification from program memory. */
  Twitter.set_account_id(PSTR("XXX"),  // dummy key value
                         PSTR("XXX")); // dummy key value
#endif

  delay(500);
}

void
loop()
{
  if (twitter.is_ready())
    {
      unsigned long now = twitter.get_time();

      if (last_tweet == 0)
        {
          /* First round after twitter initialization. */
          Serial.print("Time is ");
          Serial.println(now);

          /* Wait few seconds before making our first tweet.  This
             gives our sensors some time to get running (I hope). */
          last_tweet = now - TWEET_DELTA + 15L;
        }

      sensors.requestTemperatures();

      float temp = sensors.getTempCByIndex(0);

      Serial.println(temp);

      if (temp != DEVICE_DISCONNECTED && now > last_tweet + TWEET_DELTA)
        {
          char msg[32];
          long val = temp * 100L;

          sprintf(msg, "Office temperature is %ld.%02ld\302\260C",
                  val / 100L, val % 100L);

          Serial.print("Posting to Twitter: ");
          Serial.println(msg);

          last_tweet = now;

          if (twitter.post_status(msg))
            Serial.println("Status updated");
          else
            Serial.println("Update failed");
        }
    }

  delay(5000);
}

Is that the only error message? When I try to compile that code I have to download a ton of libraries and make a lot of changes to get them to work with the latest version of Arduino. The sha1 library, for example, is six years old!

Actually no, but as I am pretty new to fiddling with Arduinos, I thought it best to first try to solve the first error message that was returned to me. For the complete faulty output, please see below.

However, since I much like the idea of sending tweets from my Arduino to Twitter's servers directly, instead of doing so through a third-party server as most Twitter libraries apparently rely on, I am keen on getting Markku Rossi's approach to work. Have you actually gotten that far? If so, I'd be interested to know by which library you have replaced the SHA1 library (if so), and what changes you have implemented to make Markku's Twitter library behave like it is supposed to.

<snip>

In file included from /Users/smwellinga/Documents/Arduino/Twitter_-_Markku_Rossi/Twitter_-_Markku_Rossi.ino:31:0:
/Users/smwellinga/Library/Arduino15/packages/arduino/hardware/avr/1.6.16/libraries/EEPROM/src/EEPROM.h:43:30: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     operator const uint8_t() const       { return **this; }
                              ^
/Users/smwellinga/Library/Arduino15/packages/arduino/hardware/avr/1.6.16/libraries/EEPROM/src/EEPROM.h:92:26: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
     operator const int() const          { return index; }
                          ^
Twitter_-_Markku_Rossi:83: error: no matching function for call to 'Twitter::Twitter(char [512], unsigned int)'
 Twitter twitter(buffer, sizeof(buffer));
                                       ^
/Users/smwellinga/Documents/Arduino/Twitter_-_Markku_Rossi/Twitter_-_Markku_Rossi.ino:83:39: note: candidates are:
In file included from /Users/smwellinga/Documents/Arduino/Twitter_-_Markku_Rossi/Twitter_-_Markku_Rossi.ino:32:0:
/Users/smwellinga/Documents/Arduino/libraries/Ethernet2/src/Twitter.h:41:2: note: Twitter::Twitter(const char*)
  Twitter(const char *user_and_passwd);
  ^
/Users/smwellinga/Documents/Arduino/libraries/Ethernet2/src/Twitter.h:41:2: note:   candidate expects 1 argument, 2 provided
/Users/smwellinga/Documents/Arduino/libraries/Ethernet2/src/Twitter.h:29:7: note: constexpr Twitter::Twitter(const Twitter&)
 class Twitter
       ^
/Users/smwellinga/Documents/Arduino/libraries/Ethernet2/src/Twitter.h:29:7: note:   candidate expects 1 argument, 2 provided
/Users/smwellinga/Documents/Arduino/libraries/Ethernet2/src/Twitter.h:29:7: note: constexpr Twitter::Twitter(Twitter&&)
/Users/smwellinga/Documents/Arduino/libraries/Ethernet2/src/Twitter.h:29:7: note:   candidate expects 1 argument, 2 provided
/Users/smwellinga/Documents/Arduino/Twitter_-_Markku_Rossi/Twitter_-_Markku_Rossi.ino: In function 'void setup()':
Twitter_-_Markku_Rossi:102: error: 'class Twitter' has no member named 'set_twitter_endpoint'
   twitter.set_twitter_endpoint(PSTR("api.twitter.com"), PSTR("/1/statuses/update.json"), twitter_ip, twitter_port, false);
           ^
Twitter_-_Markku_Rossi:103: error: 'class Twitter' has no member named 'set_client_id'
   twitter.set_client_id(consumer_key, consumer_secret);
           ^
Twitter_-_Markku_Rossi:107: error: 'class Twitter' has no member named 'set_account_id'
   twitter.set_account_id(256, 384);
           ^
/Users/smwellinga/Documents/Arduino/Twitter_-_Markku_Rossi/Twitter_-_Markku_Rossi.ino: In function 'void loop()':
Twitter_-_Markku_Rossi:120: error: 'class Twitter' has no member named 'is_ready'
   if (twitter.is_ready())
               ^
Twitter_-_Markku_Rossi:122: error: 'class Twitter' has no member named 'get_time'
       unsigned long now = twitter.get_time();
                                   ^
Twitter_-_Markku_Rossi:141: error: 'DEVICE_DISCONNECTED' was not declared in this scope
       if (temp != DEVICE_DISCONNECTED && now > last_tweet + TWEET_DELTA)
                   ^
Twitter_-_Markku_Rossi:154: error: 'class Twitter' has no member named 'post_status'
           if (twitter.post_status(msg))
                       ^
In file included from /Users/smwellinga/Documents/Arduino/Twitter_-_Markku_Rossi/Twitter_-_Markku_Rossi.ino:31:0:
/Users/smwellinga/Library/Arduino15/packages/arduino/hardware/avr/1.6.16/libraries/EEPROM/src/EEPROM.h: At global scope:
/Users/smwellinga/Library/Arduino15/packages/arduino/hardware/avr/1.6.16/libraries/EEPROM/src/EEPROM.h:145:20: warning: 'EEPROM' defined but not used [-Wunused-variable]
 static EEPROMClass EEPROM;
                    ^
Bibliotheek SPI op versie 1.0 in map: /Users/smwellinga/Library/Arduino15/packages/arduino/hardware/avr/1.6.16/libraries/SPI  wordt gebruikt
Bibliotheek Ethernet2 op versie 1.0.3 in map: /Users/smwellinga/Documents/Arduino/libraries/Ethernet2  wordt gebruikt
Bibliotheek OneWire op versie 2.3.2 in map: /Users/smwellinga/Documents/Arduino/libraries/OneWire  wordt gebruikt
Bibliotheek DallasTemperature op versie 3.7.6 in map: /Users/smwellinga/Documents/Arduino/libraries/DallasTemperature  wordt gebruikt
Bibliotheek Sha in map: /Users/smwellinga/Documents/Arduino/libraries/Sha (legacy) wordt gebruikt
Bibliotheek EEPROM op versie 2.0 in map: /Users/smwellinga/Library/Arduino15/packages/arduino/hardware/avr/1.6.16/libraries/EEPROM  wordt gebruikt
exit status 1
no matching function for call to 'Twitter::Twitter(char [512], unsigned int)'

It looks like the 'example' you are trying to use does not natch the Twitter library you are trying to use it with. Where did you get the example code?