| View previous topic :: View next topic |
| Author |
Message |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
Posted: Sun Feb 17, 2013 1:05 pm Post subject: |
|
|
| Works great! thanks! |
|
| Back to top |
|
 |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
Posted: Sun Feb 17, 2013 1:42 pm Post subject: |
|
|
I have updated my eggdrop version and now encounter this problem:
| Quote: |
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)
|
What should I do? |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sun Feb 17, 2013 3:02 pm Post subject: |
|
|
| BigToe wrote: | I have updated my eggdrop version and now encounter this problem:
| Quote: |
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)
|
What should I do? |
| Quote: | 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 |
It appears, you already have base64. There is no need to source it as shown above. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
Posted: Sun Feb 17, 2013 3:04 pm Post subject: |
|
|
Thanks speechles,
But how do I know if I have tcl lib installed? |
|
| Back to top |
|
 |
xelanis Voice
Joined: 13 Mar 2013 Posts: 2
|
Posted: Wed Mar 13, 2013 1:26 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Mar 13, 2013 2:14 am Post subject: |
|
|
| 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. |
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.
Find the setting below in oauth.tcl: | Code: | # Incorrect signature, other errors pissing you off.
# Get the inside look at every oauth transaction via query
# set your debug nick here
set oauthdebug "" |
Put your nickname for the value of oauthdebug. ( set oauthdebug "yournick" ) then .rehash your bot after making this change, and quickly !tweet something with spaces like the example below, then quickly re-edit oauth.tcl and change the oauthdebug setting back to "" and issue a .rehash
now...scroll back, and look for the debug for your tweet. It should look something similar to what you see of mine below (keep in mind when debug is enabled you will see all of it's oauth transactions, even it's automations. This is why you have to quickly do the above.. heh): | Quote: | <speechles> !tweet hello world testing testing 1.. 2.. 3..
<bot> Tweet created: http://twitter.com/suqmuhnutz ( 311717362040729601@suqmuhnutz - 0s ago via bittersweet ) | The debug should look like below: | Quote: | <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.. |
I've changed of course my tokens in the spots to discourage abuse. But the parts you need to be concerned with are: | Quote: | | <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..} |
At the end of the "oauth:query_api" line is the status. Notice the %20's present. Also: | Quote: | | <bot> my_query status=%3Cspeechles%3E%20hello%20world%20testing%20testing%201..%202..%203.. |
The "my_query" line should look the same.
| Quote: | | 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 |
The end of the "base-string" should contain the %2520's showing that yes, the spaces were indeed correctly double-encoded.
I discourage using anything previous to HTTP Package 2.5.3. So do not use version 2.5.0, 2.5.1 or 2.5.2. I also discourage using anything under 2.7.5 if using the 2.7.x branch. These versions will cause issues with http transactions. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
xelanis Voice
Joined: 13 Mar 2013 Posts: 2
|
Posted: Wed Mar 13, 2013 3:09 am Post subject: |
|
|
Thanks.
After install 2.7.10 backport to 8.4 all work fine. |
|
| Back to top |
|
 |
TeknoJuce Voice
Joined: 26 Nov 2012 Posts: 4
|
Posted: Tue Apr 02, 2013 3:09 am Post subject: party line errors |
|
|
Version: EggDrop 1.6.21 - twitter.tcl 5.05c
I don't have anything set here (or anyplace else in the eggdrop.conf):
| Code: | # 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... |
I've set:
eggdrop.conf
| Code: | source scripts/sha1.tcl
source scripts/base64.tcl
source scripts/oauth.tcl
source scripts/twitter.tcl |
Partyline
| Code: | .+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 |
.chaninfo #unlab
| Code: | <unLabBot> User defined channel flags:
<unLabBot> +durby +google -spokesecret +twitter
<unLabBot> -twittermega -twittermentions -twittermentionsmega -twitterfriends
<unLabBot> +twittertrack -twitterfollowers |
| Code: | .chaninfo #unlondon
<unLabBot> User defined channel flags:
<unLabBot> +durby +google -spokesecret +twitter
<unLabBot> -twittermega -twittermentions -twittermentionsmega -twitterfriends
<unLabBot> +twittertrack -twitterfollowers |
PartyLine
| Code: | <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 |
I only want to use the tracker part of the script nothing else, I tried to plus all the others and it still kept complaining on the partyline and .rehash didn't help.
Just to note I know I set up the tracker part properly as tweets are getting vomited into the chat channel with just the specific search phrases.
I've tried to !tweet as well but it errors out like the above person:
| Code: | <NonaSuomy> !tweet test010101110
<unLabBot> OAuth failed: (401) Error: read-only application cannot post; Request: /1/statuses/update.json ( ok ) |
haven't had a moment to look into that as it's hard for me to follow how to debug the situation.
Any help to squash these errors would be great, thanks for your time. |
|
| Back to top |
|
 |
Xelas Voice
Joined: 19 Oct 2005 Posts: 2
|
Posted: Sun Apr 28, 2013 1:24 am Post subject: |
|
|
Hi.
Please, tell me how modify twitter(restapi-display) template to display screen_name of user who retweet message, but not author of retweeted message.
Example: now template set as:
| Code: | | set twitter(restapi-display) "\002@%screen%\002: %text%\017" |
in channel I see
| Quote: | | @Simanchev: RT @Simanchev: some text. |
but originally this tweet retwitted by @tweeter_knitter and I was hoping to get
| Quote: | | @twitter_knitter: RT @Simanchev: some text. |
|
|
| Back to top |
|
 |
BigToe Halfop
Joined: 30 Dec 2010 Posts: 99
|
Posted: Sat May 18, 2013 4:48 am Post subject: |
|
|
hello speechles,
I wanted to know if there is a way with your script, to pull a username's numeric ID?
i.e
Something like
!numericID <username here>
will return his numericID + can this be included when using +track? |
|
| Back to top |
|
 |
Ankara Voice

Joined: 13 Oct 2012 Posts: 2
|
Posted: Tue Jun 11, 2013 7:17 pm Post subject: |
|
|
Noticing today with the retirement of api v1, getting an OAuth error:
| Code: | | 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 ) |
Was trying to fix it myself, but I can't seem to find the problem.
EDIT:
Think I found it: when I enabled debugging, the first thing I noticed was this: | Code: | | oauth:query_api http://api.twitter.com/1/statuses/user_timeline.xml | I remembered that support for xml was dropped in favor of JSON. from the twitter overview page: | Code: | | 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. |
Going to try some modifications to the timeline URLs in the main Birdy script to see if that fixes anything. will post my results once I have some |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Jun 12, 2013 6:32 am Post subject: |
|
|
| Ankara wrote: | Noticing today with the retirement of api v1, getting an OAuth error:
| Code: | | 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 ) |
|
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.
So what I've done, is try to clean up as much as possible and get working the primary functions of the script. The automations to relay in friends/mentions/track are fully working. The automations for megahal are not. The triggers which will not work at the moment:
- !friends this endpoint is gone in v1.1. It must now be obtained by 2 fetches for what used to take 1. Needs work.
- !followers same reason as above why it's broken. Work here too.
- !rtbyme this timeline is no longer supported by twitter at all. Gone.
- !rttome this timeline is no longer supported by twitter at all. Gone.
- !rate v1.1 rate status is now done on a per endpoint allocation quota and uses 15 minutes as the reset period. this is entirely different than v1.0. Needs work.
- !twitter this was broken previously, this will be fixed. Needs love.
- !public this timeline is no longer supported by twitter at all. Gone.
Taking this into account. This script is now in BETA form.
Birdy (OAuth, Twitter, Tweets&MegaHAL v6.01d) Jun12,2013
Also, do not enable megahal in this release...
Once more for those just tuning in...
DO NOT ENABLE MEGAHAL IN THIS RELEASE (v6.01d)
.chanset * -twittermega -twittermentionsmega
The megahal was still using the old xml payload twitter offered under v1.0. With the new v1.1 xml is no longer supported. I will update the megahal parser to work with the new json endpoints as well. Expect there to be minor display issues here and there occasionally. These are caused by slight differences in the 1.1 vs 1.0 payloads. These can fixed as well. It just takes time, hence moving this script into BETA status for the moment. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Football Master
Joined: 26 Dec 2008 Posts: 205 Location: Quakenet, #Football
|
Posted: Wed Jun 12, 2013 1:49 pm Post subject: |
|
|
magnificent and just on time, as usual, speechles!
Well done, great work! _________________ Idling at #Football, Quakenet. |
|
| Back to top |
|
 |
hicks Voice
Joined: 19 Dec 2007 Posts: 9
|
Posted: Wed Jun 12, 2013 5:31 pm Post subject: |
|
|
I get up this morning, realise I'm getting errors. I go to work. I get home, and you've already fixed it.
Thank you so much, speechles. Legend  |
|
| Back to top |
|
 |
hicks Voice
Joined: 19 Dec 2007 Posts: 9
|
Posted: Wed Jun 12, 2013 6:10 pm Post subject: |
|
|
Ah. Except I'm getting this error in partyline and in channel "OAuth failed: (???) Unsupported URL type "https" ( internal error )"
Used new script as it was, except I pasted in key/secret etc in twitter(accts) section from old script. Guessing this is something odd to do with my own setup. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|