You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 25, 2018. It is now read-only.
I have generated the model, and added in all the auth stuff in my generated bot. But when I run ruby run.rb
it all fires up just fine, but nothing ever happens. I'm fairly certain it doesn't actually connect to twitter, either, as I replace the keys, secrets, and tokens with gibberish (or even completely comment them out) and it still fires up without error.
I'm sure I'm missing something here. My steps:
Create app under the twitter account that will be my bot (let's call it 'mattbot' - NOTE: That is NOT the real account name)
Ensure that the app has r/w/dm rights. Generate oauth token for mattbot under that app
Run ebooks new mattbot to create the new repo
Edit the bots.rb in the mattbot repo to put in all the keys, secrets, tokens, et al
Uncomment out a few handlers in bots.rb:
bot.on_mention do |tweet, meta|
# Reply to a mention
bot.reply(tweet, meta[:reply_prefix] + "oh hullo")
end
bot.on_timeline do |tweet, meta|
# Reply to a tweet in the bot's timeline
bot.reply(tweet, meta[:reply_prefix] + "nice tweet")
end
Within the mattbot repo, enter ruby run.rb
~/src/mattbot/ [master] ruby run.rb
Faraday::Builder is now Faraday::RackBuilder.
@mattbot: starting stream for petechesbot
@mattbot: Online!
Attempt to reply to mattbot on twitter
Nothing happens
Edit bots.rb and comment out all lines with secret keys, etc
Attempt to ruby run.rb again
Same result
What am I missing?
_For the record, I tried this all by pushing it to heroku first, with much the same result. I switched back to running ruby run.rb locally for efficiency of troubleshooting_
The text was updated successfully, but these errors were encountered:
OK, email address was verified. I determined the same behavior if I basically clone down https://github.com/mispy/ebooks_example and replace it with my own data.
The bit I'm wondering has to do with the Oauth token - on the twitter apps page, this is now referred to as "Your Access Token" - I presume that is the same token referred to?
OK. It is working after all. That is, I can see the bot generating tweets (well, it did it twice). It doesn't seem to interact with @ replies, but that's a problem for another day.
I have generated the model, and added in all the auth stuff in my generated bot. But when I run
ruby run.rb
it all fires up just fine, but nothing ever happens. I'm fairly certain it doesn't actually connect to twitter, either, as I replace the keys, secrets, and tokens with gibberish (or even completely comment them out) and it still fires up without error.
I'm sure I'm missing something here. My steps:
ebooks new mattbot
to create the new reporuby run.rb
What am I missing?
_For the record, I tried this all by pushing it to heroku first, with much the same result. I switched back to running
ruby run.rb
locally for efficiency of troubleshooting_The text was updated successfully, but these errors were encountered: