This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Birdy (OAuth, Twitter, Tweets&MegaHAL v6.01d) Jun12,2013

Support & discussion of released scripts, and announcements of new releases.
Post Reply
F
Football
Master
Posts: 205
Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football

Post by Football »

Another suggestion, numbers & lists of users who are not following you back.

i.e

!twitter IRCFootball
Name: IRC Football; location: #Football @ IRC Quakenet; Following: 2,885 (132 are not following back); Followers: 2,713 (200 are not followed back by you); Listed: 23; Total Tweets: 1,464. Following: No.
Follows You: YES.

and..

!NotfollowingBack

@IamHurtly, @DrinkTea, @FriendsofMaster... etc..
Idling at #Football, Quakenet.
F
FightingNavyman
Voice
Posts: 35
Joined: Tue Jan 18, 2011 12:39 pm

twitter

Post by FightingNavyman »

hey Speechles. once again you did an awsome job. 10/10 :D
F
Football
Master
Posts: 205
Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football

Post by Football »

Another suggestion,

Some sort of notification every time someone retweets one of your tweets?
Idling at #Football, Quakenet.
F
FightingNavyman
Voice
Posts: 35
Joined: Tue Jan 18, 2011 12:39 pm

Birdy (OAuth, Twitter, Tweets&MegaHAL v5.05c) 8-29-2o11

Post by FightingNavyman »

hi.. when i try to turn ON my bot i get this weird error:

Code: Select all

[20:18:46] Tcl error in file 'cornholio.conf':
[20:18:46] wrong # args: should be "regsub ?switches? exp string subSpec ?varName?"
    while executing
"regsub -all -line \
"
    (file "scripts/twitter/sha1.tcl" line 1059)
    invoked from within
"source scripts/twitter/sha1.tcl"
    (file "cornholio.conf" line 1386)
[20:18:46] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: Birdy (OAuth, Twitter, Tweets&MegaHAL v5.05c) 8-29-2

Post by speechles »

invoked from within
"source scripts/twitter/sha1.tcl"
(file "cornholio.conf" line 1386)
[20:18:46] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
This isn't actually an error with birdy. Birdy is simply oAuth.tcl and twitter.tcl combined. They do require the additional support of base64 and sha1 for it to calculate base signatures and do its hash algorithms before making requests to twitter. You either have these with your tcl installation as packages. Which you can check, on your bots partyline type ".tcl package require sha1" does that work? if so, do not source sha1.tcl in your eggdrop.conf. Same goes for base64. Do not source this if you have the provided packages present on your system. Sourcing them as scripts is a dirtier work around with no serious consequences other than paths and permissions might be incorrect on some functions on whatever that package may be. For sha1 and base64 these packages work either way just fine. Sourced or provided as an included package.

If it isn't caused by sourcing sha1 when it was present as a provided package.The best way to check is kill your bot. Delete it's twitter.dat found in your eggdrops root. Restart the eggdrop. Does it still experience that issue? If it does, it's an installation issue or otherwise causing the problem and something isn't in sync correctly. Did you edit sha1.tcl and save it thereby removing newlines/carriage returns or something? It's best to never edit or touch sha1.tcl or base64.tcl to avoid having it "accidentally" save and screw up it's formatting.. Let me know if you continue to experience the issue.
F
Football
Master
Posts: 205
Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football

Post by Football »

Would be nice if when someone replies to one of your tweet, it will write both the original tweet and the reply so you will know to what tweet hes referring to
Idling at #Football, Quakenet.
t
terron
Voice
Posts: 3
Joined: Mon Oct 11, 2010 2:22 am

Post by terron »

Would it be possible to have the megahal portion mention a random follower/person you're following?
l
lishalulz
Voice
Posts: 1
Joined: Sun Mar 04, 2012 6:59 am

Post by lishalulz »

Hi guys! Can someone please explain this?

wrong # args: should be "oauth:query_api url method oauth_token oauth_token_secret query_dict"

Thanks!
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

terron wrote:Would it be possible to have the megahal portion mention a random follower/person you're following?
Twitter's Automation Rules and Best Practices wrote:...snpped irrelevant parts...
Automated @Replies and Mentions

The @reply and Mention functions are intended to make communication between users easier, and automating these processes to place unsolicited messages into lots of users’ reply tabs is considered an abuse of feature. If you are automatically sending @reply messages or Mentions to a bunch of users, the recipients must request or approve this action in advance. For example, sending automated @replies based on keyword searches is not permitted.

Users should also have an easy way to opt-out of your service (in addition to the requirement that all users must opt-in before receiving the messages). We review blocks and reports of spam, so you’ll need to provide a clear way for users to stop your messages.
So it is considered abuse to approach someone, without them having approached you first. This is why the megahal replies to your @mention's. Those users have contacted you first. It is then considered normal to reply back to them. To apporach a user cold is against the rules for an automated process on twitter. Everything the script does must follow these automation rules, or your account risks suspension/deletion as does your application. They are quite serious about this, and swift to enforce.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

lishalulz wrote:Hi guys! Can someone please explain this?

wrong # args: should be "oauth:query_api url method oauth_token oauth_token_secret query_dict"

Thanks!
That error cannot occur with "birdy". As you see below your error does not match, hence it is not caused by the oauth.tcl used with "birdy".

Code: Select all

proc oauth:query_api {url consumer_key consumer_secret method oauth_token oauth_token_secret query_dict} {
The code which actually wraps into oauth:query_api is found below...

Code: Select all

# Multiple account wrapper. Single token use. No pin required.
proc proc:twitter:oauth {url method chan query} {
	global twitter
	set found [lsearch -glob $twitter(accts) "[string tolower $chan]|*"]
	if {$found != -1} {
		set tuser [lindex [split [lindex $twitter(accts) $found] |] 1]
		set c_tok [lindex [split [lindex $twitter(accts) $found] |] 2]
		set c_sec [lindex [split [lindex $twitter(accts) $found] |] 3]
		set o_tok [lindex [split [lindex $twitter(accts) $found] |] 4]
		set o_sec [lindex [split [lindex $twitter(accts) $found] |] 5]
		set tformat [join [lrange [split [lindex $twitter(accts) $found] |] 6 end]]
		if {[catch {set reply [oauth:query_api $url $c_tok $c_sec $method $o_tok $o_sec $query]} error]} { error $error }
		return $reply
	}
}
Ths code depends on twitter(accts) section of twitter.tcl. You may experience that error if you haven't followed the steps correctly in the setup.

The correct setup is found: >> here <<

My script uses a modified oauth.tcl taken from horgh's original twitter.tcl on github. My modified copy corrects some flaws his had, and changes it to single-token acquisition. It also adds an oauth wrapper which supports my twitter.tcl. Together inside twitter.zip are: base64.tcl, oauth.tcl, sha1.tcl and twitter.tcl. Combined these are what is known as "birdy".

You should download "birdy" from here: http://ereader.kiczek.com/twitter.zip

This is the "official" place for the most recent version. There is no other repository that should be hosting this. Any that do will surely not have the most up-to-date copy. This is not found on egghlep's tcl archive, nor should it be. This is for those brave enough to look on the forum, not those lazy few who merely browse the tcl archive.
t
terron
Voice
Posts: 3
Joined: Mon Oct 11, 2010 2:22 am

Post by terron »

speechles wrote:...
Ah, okay. I didn't know about that rule. Thanks for the heads up.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

terron wrote:Ah, okay. I didn't know about that rule. Thanks for the heads up.
A lot of the ideas people have can be realized. It's just that with the way twitter runs its "rate limit" policy and it's automation and best practices. Most of the methods to attain things would cause your accounts and applications to get suspended over time. I will add more features eventually. The !friends/!followers command will only list the last 100. It doesn't list them all. Also, the automated detector for new and lost followers. This doesn't track above 100 as well. These are limitations put in place because of how twitter changed it's API. The new method to attain these requires several API hits now. This is something that will eventually get added when I have time for it. Sorry the updates won't be tomorrow but eventually this script will have an update to address those short-comings...
s
shaneo
Voice
Posts: 8
Joined: Mon Jan 09, 2012 5:18 pm

Post by shaneo »

blake wrote:hey


keep getting the following when i try send a tweet

Code: Select all

[15:13] <TwitterBot> [18:13:00]  unable to convert date-time string "2011-11-25 18:13:00 MSK": syntax error (characters 19-22)

Solved this issue
If you dont mind me asking how exactly did you fix this error cause i cant seem to get it to go away

n/m found it in the forums
J
Jagg
Halfop
Posts: 53
Joined: Sat Jan 24, 2004 11:32 am

Post by Jagg »

I updated to newest version (v5.05c) and now I always get only that line

Code: Select all

 OAuth failed: (???) Unknown problem... No reason given...( timeout )
F
FightingNavyman
Voice
Posts: 35
Joined: Tue Jan 18, 2011 12:39 pm

Post by FightingNavyman »

Thanks speechles this script is just awesome.. i dont know what i did to fix it but it got fixed :)
Post Reply