Code: Select all
<botname> OAuth failed: (404) that page does not exist</error> </errors>; <?xml version=1.0 encoding=utf-8?> <errors> <error code=34>sorry ( ok )
Code: Select all
<botname> (Megahal) Botname replied to (twittername) accounts.]
Partly their fault, partly mine. All endpoints using twitter.com directly can no longer be used for API requests. (WHY?: This stops alot of spam bots and link harvesting bots.) This was my fault, because this was told to developers a long time ago, it's just that twitter never really "enforced" that policy until now, so why fix what isn't broken I never updated all the url's to compliance... oopsAnkara wrote:Looks like those wonderful new features are beginning to be implemented over at twitter. </sarcasm>
I see this now when my bot tries to update to twitter:
then followed by:Code: Select all
<botname> OAuth failed: (404) that page does not exist</error> </errors>; <?xml version=1.0 encoding=utf-8?> <errors> <error code=34>sorry ( ok )
It still seems to be working however, as my bot is answering people.Code: Select all
<botname> (Megahal) Botname replied to (twittername) accounts.]
I believe this is due to one of the *special* changes they had planned for us evil app users.
Code: Select all
set twitter(userxml) "http://twitter.com/statuses/user_timeline.xml"
set twitter(home) "http://twitter.com/statuses/home_timeline.json"
set twitter(mention) "http://twitter.com/statuses/mentions.json"
set twitter(mentionxml) "http://twitter.com/statuses/mentions.xml"
Code: Select all
set twitter(userxml) "http://api.twitter.com/1/statuses/user_timeline.xml"
set twitter(home) "http://api.twitter.com/1/statuses/home_timeline.json"
set twitter(mention) "http://api.twitter.com/1/statuses/mentions.json"
set twitter(mentionxml) "http://api.twitter.com/1/statuses/mentions.xml"
Bro, I never saw the original post asking for help here. Assume we are all human and pobody is nerfect... Everything is possible, until it is attempted. At which point maybe something becomes impossible. So lets attempt...BigToe wrote:Is that a no?
Code: Select all
if {[string equal -nocase "friends" $type]} {
if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} {
if {![info exists skip]} {
putserv "$to :$tt" ; set sp 0
}
if {![info exists pure]} {
set twitter($tuser,lastidf) $id
set pure 0
}
}
} else {
Code: Select all
if {[string equal -nocase "friends" $type]} {
if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} {
if {![info exists skip]} {
if {![file exists "twitter-friends-$chan.txt"]} {
set file [open "twitter-friends-$chan.txt" w]
} else {
set file [open "twitter-friends-$chan.txt" a]
}
puts $file $tt ; set sp 0 ; close $file
}
if {![info exists pure]} {
set twitter($tuser,lastidf) $id
set pure 0
}
}
} else {
speechles wrote:Bro, I never saw the original post asking for help here. Assume we are all human and pobody is nerfect... Everything is possible, until it is attempted. At which point maybe something becomes impossible. So lets attempt...BigToe wrote:Is that a no?
Find that chunk, and make that chunk into something like it is below...Code: Select all
if {[string equal -nocase "friends" $type]} { if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} { if {![info exists skip]} { putserv "$to :$tt" ; set sp 0 } if {![info exists pure]} { set twitter($tuser,lastidf) $id set pure 0 } } } else {
Make sure to disable \n newlines in tweets (the option to do this is in the config) when using this hack. This will save all the "friends" automations. This isn't a perfect hack either. This open/closes the file several times in a row, which should be fine. But isn't the most economical solution. I have to rewrite this script to support v1.1 of twitter's oauth by march 21st or it will entirely die. So when spending time on birdy my focus will be on this goal rather than adding features. If you need @mentions hacked in to save to a file too, let me know.Code: Select all
if {[string equal -nocase "friends" $type]} { if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} { if {![info exists skip]} { if {![file exists "twitter-friends-$chan.txt"]} { set file [open "twitter-friends-$chan.txt" w] } else { set file [open "twitter-friends-$chan.txt" a] } puts $file $tt ; set sp 0 ; close $file } if {![info exists pure]} { set twitter($tuser,lastidf) $id set pure 0 } } } else {
Sure...BigToe wrote:Hey speechles - is it possible to add in addition to this the Date and time the tweet was written to the file at the end of each tweet?
Code: Select all
# Add your timestring which the file saving portion will use
# to create it's timestamps
set twitter(filetimestring) {%Y-%m-%d %I:%M:%S%p}
Code: Select all
if {[string equal -nocase "friends" $type]} {
if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} {
if {![info exists skip]} {
if {![file exists "twitter-friends-$chan.txt"]} {
set file [open "twitter-friends-$chan.txt" w]
} else {
set file [open "twitter-friends-$chan.txt" a]
}
puts $file "[clock format [clock seconds] -format $::twitter(filetimestring)] $tt" ; set sp 0 ; close $file
}
if {![info exists pure]} {
set twitter($tuser,lastidf) $id
set pure 0
}
}
} else {