Botを作ってみました

530
-1

Published on

ruby で twitter_oauth でゲレンデ情報をツイートするボットを作ったことについて。

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
530
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Botを作ってみました

    1. 1. bot Ruby twitter_oauth Akita.m 2011.1.19
    2. 2. @slope_akita • @gutskun
    3. 3. http://d.hatena.ne.jp/gutskun/20101230/1293677137 • bot • PIN • bot
    4. 4. bot• twitter• • gmail • foo + bar @gmail.com ( 1) • ( 2)
    5. 5. • @gutskun• > > ( )
    6. 6. •• Read & Write
    7. 7. • Consumer key• Consumer secret
    8. 8. PIN • make_token.rb (mirakui ) https://gist.github.com/388067 • oauth_tokenluke:bot ISD$ ruby make_token.rbConsumer Key> sUYsI7yoP99U4egGGNnYtAConsumer Secret> EKXLYibot6PBy5IrLBfEaMmHbyxn5L3H6DZxmDpdMOKplease access and get PIN: http://api.twitter.com/oauth/authorize?oauth_token=c8NX52UtRj9z5KU7M5Dx5Av149A7U3aPV1v0ePjU0
    9. 9. • bot• url• PIN
    10. 10. • Access Token • Access SecretPIN> 2110088Authorized: trueAccess Token: 231715650-q5jtdKlpxWT2cEk7VFgi2H40jdxEniaMCX3z6EtaAccess Secret: E3jZlem4PlhsacJULpCCK99TlaIOuFixKix81Nyp5SI
    11. 11. twitter_oauth•• update •def twitter TwitterOAuth::Client.new({ :consumer_key => @config[twitter][consumer_key], :consumer_secret => @config[twitter][consumer_secret], :token => @config[twitter][token], :secret => @config[twitter][secret] })end@twitter = twitter@twitter.update(‘Hello, world’)
    12. 12. ••
    13. 13. ••
    14. 14. • (Ruby)•
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×