What should I do?
conflicting versions provided for package "base64": 2.3.2, then 2.4.1
while executing
"package provide base64 2.4.1"
(file "scripts/base64.tcl" line 379)
invoked from within
"source scripts/base64.tcl"
(file "Reddit.conf" line 1387)
* CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
BigToe wrote:I have updated my eggdrop version and now encounter this problem:
What should I do?
conflicting versions provided for package "base64": 2.3.2, then 2.4.1
while executing
"package provide base64 2.4.1"
(file "scripts/base64.tcl" line 379)
invoked from within
"source scripts/base64.tcl"
(file "Reddit.conf" line 1387)
* CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
It appears, you already have base64. There is no need to source it as shown above.12) edit eggdrop.conf adding the following scripts in the order below:
If you have tcl-lib installed omit sourcing sha1 and base64
source scripts/sha1.tcl
source scripts/base64.tcl
source scripts/oauth.tcl
source scripts/twitter.tcl
The problem is your http package version.. It is incorrectly encoding spaces as + instead of %20. The OAuth specification requires double encoding of the status body for a tweet. A + when double encoded will remain + but.. A (space) when encoded becomes %20, when double encoded this become %2520.xelanis wrote:Hello!
Script work fine with GET requests. +/-follow,+/-app,!followers,!mymenitons command run and authorize correctly.
But, !tweet someone do not work with error: OAuth failed: (401) Error: could not authenticate with oauth.; Request: /1/statuses/update.json ( ok )
Why?
PS consumer_key/secret and oauth_token/secret are copied correctly from Apps page. GET requests work with this key/secret and auth correct.
Code: Select all
# Incorrect signature, other errors pissing you off.
# Get the inside look at every oauth transaction via query
# set your debug nick here
set oauthdebug ""
The debug should look like below:<speechles> !tweet hello world testing testing 1.. 2.. 3..
<bot> Tweet created: http://twitter.com/suqmuhnutz ( 311717362040729601@suqmuhnutz - 0s ago via bittersweet )
I've changed of course my tokens in the spots to discourage abuse. But the parts you need to be concerned with are:<bot> oauth:query_api http://api.twitter.com/1/statuses/update.json ilwnjqhNsiCAn94mZXTAzQ q2gIVG5S2BWfVbN5zcsu8JdRY127r7j0sSXTN6iC4 POST 109926964-zVU1XqmBfabzl8PmWRt5OaAz3XXiQLgvLHR7phZU PWCqKOBrgmWkRURTnO6EeurytaSSVcBNbkTbyKY {status %3Cspeechles%3E%20hello%20world%20testing%20testing%201..%202..%203..}
<bot> oauth_raw {oauth_consumer_key ilwnjqhNsiCAn94mZXTAzQ} {oauth_nonce 51ac91718e93d294098d92520cb4ac5e001ba7a1} {oauth_signature_method HMAC-SHA1} {oauth_timestamp 1363154272} {oauth_token 109926964-zVU1XqmBfaaSl8Pmlat5OaAz3XXLgvLHR7phZU} {oauth_version 1.0}
<bot> oauth_raw_sign {oauth_consumer_key ilwnjqhNsiCAn94mZXTAzQ} {oauth_nonce 51ac91718e93d294098d92520cb4ac9e001ba7a1} {oauth_signature_method HMAC-SHA1} {oauth_timestamp 1363154272} {oauth_token 109926964-zVU1XqmBfaaSl8PmTFt5OaAz3XXLgvLHR7phZU} {oauth_version 1.0} {status %3Cspeechles%3E%20hello%20world%20testing%20testing%201..%202..%203..}
<bot> base-string POST&http%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fupdate.json&oauth_consumer_key%3DilwnjqhNsiCAn94mZXTAzQ%26oauth_nonce%3D51ac91718e93d294098d92520cb4ac5e001ba7a1%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1363154272%26oauth_token%3D109926964-zVU1XqmBfaaSl8PmWRt5OaAz3XXiQLgvLHR7phZU%26oauth_version%3D1.0%26status%3D%253Cspeechles%253E%2520hello%2520world%2520testing%2520testing%25201..%25202..%25203
<bot> signature SkZ0AA5yY7XUhfS57Zbg9n6IvBg=
<bot> oauth_raw {oauth_consumer_key ilwnjqhNsiCAn94mZXTAzQ} {oauth_nonce 51ac91718e93d294098d92520cb4ac5e001ba7a1} {oauth_signature SkZ0AA5yY7XUhfS57Zbg9n6IvBg=} {oauth_signature_method HMAC-SHA1} {oauth_timestamp 1363154272} {oauth_token 109926964-zVU1XqmBfaaSl8PmWRt5OaAz3XXLgvLHR7phZU} {oauth_version 1.0}
<bot> oauth_header oauth_consumer_key="ilwnjqhNsiCAn94mZXTAzQ",oauth_nonce="51ac91718e93d294098d92520cb4ac5e001ba7a1",oauth_signature="SkZ0AA5yY7XUhfS57Zbg9n6IvBg%3D",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1363154272",oauth_token="109926964-zVU1XqmBfaaSl8PmWRt5OaAz3XXLgvLHR7phZU",oauth_version="1.0"
<bot> my_query status=%3Cspeechles%3E%20hello%20world%20testing%20testing%201..%202..%203..
At the end of the "oauth:query_api" line is the status. Notice the %20's present. Also:<bot> oauth:query_api http://api.twitter.com/1/statuses/update.json ilwnjqhNsiCAn94mZXTAzQ q2gIVG5S2BWfVbN5zcsu8JdRY127r7j0sSXTN6iC4 POST 109926964-zVU1XqmBfabzl8PmWRt5OaAz3XXiQLgvLHR7phZU PWCqKOBrgmWkRURTnO6EeurytaSSVcBNbkTbyKY {status %3Cspeechles%3E%20hello%20world%20testing%20testing%201..%202..%203..}
The "my_query" line should look the same.<bot> my_query status=%3Cspeechles%3E%20hello%20world%20testing%20testing%201..%202..%203..
The end of the "base-string" should contain the %2520's showing that yes, the spaces were indeed correctly double-encoded.base-string POST&http%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fupdate.json&oauth_consumer_key%3DilwnjqhNsiCAn94mZXTAzQ%26oauth_nonce%3D51ac91718e93d294098d92520cb4ac5e001ba7a1%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1363154272%26oauth_token%3D109926964-zVU1XqmBfaaSl8PmWRt5OaAz3XXiQLgvLHR7phZU%26oauth_version%3D1.0%26status%3D%253Cspeechles%253E%2520hello%2520world%2520testing%2520testing%25201..%25202..%25203
Code: Select all
# To add a channel to eggdrop, please enter the bot's partyline and type
# .+chan #channel. Check also .help chanset and .help chaninfo.
# You can still add a channel here and it will be saved if you have a
# chanfile. We recommend you to use the partyline though.
#
# channel add #foo
#### SERVER MODULE ####
etc...
Code: Select all
source scripts/sha1.tcl
source scripts/base64.tcl
source scripts/oauth.tcl
source scripts/twitter.tcl
Code: Select all
.+chan #unlab
.+chan #unlondon
.chanset #unlab +twitter
.chanset #unlondon +twitter
.chanset #unlab +twittertrack
.chanset #unlondon +twittertrack
.chanset #unlab -twittermentions
.chanset #unlondon -twittermentions
.chanset #unlab -twittermega
.chanset #unlondon -twittermega
.chanset #unlab -twittermentionsmega
.chanset #unlondon -twittermentionsmega
.chanset #unlab -twitterfriends
.chanset #unlondon -twitterfriends
Code: Select all
<unLabBot> User defined channel flags:
<unLabBot> +durby +google -spokesecret +twitter
<unLabBot> -twittermega -twittermentions -twittermentionsmega -twitterfriends
<unLabBot> +twittertrack -twitterfollowers
Code: Select all
.chaninfo #unlondon
<unLabBot> User defined channel flags:
<unLabBot> +durby +google -spokesecret +twitter
<unLabBot> -twittermega -twittermentions -twittermentionsmega -twitterfriends
<unLabBot> +twittertrack -twitterfollowers
Code: Select all
<unLabBot> [18:10:00] Tcl error [proc:twitter:followers:auto]: no such channel record
<unLabBot> [18:10:01] Tcl error [proc:twitter:trackauto]: no such channel record
<unLabBot> [18:10:01] Tcl error [proc:twitter:friendsauto]: no such channel record
<unLabBot> [18:10:01] Tcl error [proc:twitter:megahal:privatereply]: no such channel record
<unLabBot> [18:10:01] Tcl error [proc:twitter:megahal]: no such channel record
Code: Select all
<NonaSuomy> !tweet test010101110
<unLabBot> OAuth failed: (401) Error: read-only application cannot post; Request: /1/statuses/update.json ( ok )
Code: Select all
set twitter(restapi-display) "\002@%screen%\002: %text%\017"
but originally this tweet retwitted by @tweeter_knitter and I was hoping to get@Simanchev: RT @Simanchev: some text.
@twitter_knitter: RT @Simanchev: some text.
Code: Select all
OAuth failed: (410) <?xml version=1.0 encoding=utf-8?><errors> <error code=68>the twitter rest api v1 is no longer active. please migrate to api v1.1. https: //dev.twitter.com/docs/api/1.1/overview.</error></errors> ( ok )
Code: Select all
oauth:query_api http://api.twitter.com/1/statuses/user_timeline.xml
Code: Select all
API v1.1 will support JSON only. We've been hinting at this for some time now, first dropping XML support on the Streaming API and more recently on the trends API. We've chosen to throw our support behind the JSON format shared across the platform. Consequently, we've decided to discontinue support for XML, Atom, and RSS, which are infrequently used today.
Indeed... I salute v1.0 of the twitter api. May she rest in peace. She served us well. It's a sad day in twitter-verse, because thousands of other applications also cried out in pain today, and died their own silent deaths. Unforunate, but all good things must come to an end. This script on the other hand.....moves onto v1.1 today.Ankara wrote:Noticing today with the retirement of api v1, getting an OAuth error:
Code: Select all
OAuth failed: (410) <?xml version=1.0 encoding=utf-8?><errors> <error code=68>the twitter rest api v1 is no longer active. please migrate to api v1.1. https: //dev.twitter.com/docs/api/1.1/overview.</error></errors> ( ok )