twitter tcl
1.0.0
This project provides an Eggdrop bot script to show tweets in IRC channels. You can also do things like tweet from IRC.
The repository contains libraries that are useful independently as well.
The scripts/libraries in this repository are:
twitoauth.tcl - A library to integrate with Twitter's OAuth.twitlib.tcl - A Twitter API client library.twitter.tcl - An Eggdrop IRC bot client/gateway script. You can use
this to output Twitter home/mentions timeline statuses to IRC channels.
You can also do things like tweet from IRC and follow/unfollow users.twitoauth.tcl, twitlib.tcl, and twitter.tcl on to your bot.
You should ensure they load in this order as the first two are
libraries that the last depends on. Like other Eggdrop scripts, you can
place them in a scripts subdirectory, and source them as usual in your
configuration file.twitlib.tcl and twitter.tcl. You
can change the options there if you like. The defaults are probably
okay.twitter.conf.sample to your bot's directory root and name it
twitter.conf. You don't need to change anything in this file. The bot
updates it in some cases..chanset #channel +twitter to provide access to !commands in
#channel. These channels also receive status update output. You issue
this command in the Eggdrop's partyline which you can reach either
through telnet or DCC chat. How you get on to the partyline depends on
your configuration.!twit_request_token in a channel you set +twitter. You will be
given instructions on what to do after (calling !twit_access_token,
etc). The bot should respond to you in the channel. If it does not,
confirm the channel is +twitter and that it recognizes you as a +o
user.There are more options than these. Refer to the header section of the scripts to see what else is available.
$state_file variable. This file is relative to
the Eggdrop root directory. You can set it to any path.$update_time option to change this.!twit / !tweet - Send a tweet!twit_msg - Send a private message!twit_trends - Look up trending hashtags!follow - Follow an account!unfollow - Unfollow an account!twit_updates - Retrieve the most recent status updates!twit_msgs - Retrieve direct messages!twit_search - Search tweets!twit_searchusers - Search users!twit_get_tweet - Retrieve a particular tweet (by ID)!followers - Show followers of a specified account (limited by the
option followers_limit)!following - Show who the specified account is following (limited by
the option followers_limit)!retweet - Retweet!twitstatus - Show bot's Twitter status. Currently this shows its
screen name.!twit_request_token <consumer_key> <consumer_secret>
!twit_access_token <oauth_token> <oauth_token_secret> <PIN from authentication url of !twit_request_token>
.chanset #channel +twitter.twitter.conf to map screen
names to channels. There is an example in twitter.conf.sample.!commands?
+twitter.Update retrieval (mentions) failed: OAuth not initialised. in the bot's partyline?
!twit_request_token in a channel
set +twitter. The bot should answer you.poll_home_timeline at the top of twitter.tcl is set
to 1. This is the default.!twit_request_token again. This restarts the authentication
process. Make sure you are logged into Twitter on the account you
want and visit the authentication URL (or login to the account you
want at this URL) and do !twit_access_token as when you initially
set up the bot.!twit_request_token match after checking/updating the write
permission. You should start over from !twit_request_token.