Botを作ってみました
Upcoming SlideShare
Loading in...5
×
 

Botを作ってみました

on

  • 584 views

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

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

Statistics

Views

Total Views
584
Views on SlideShare
584
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Botを作ってみました Botを作ってみました Presentation Transcript

  • bot Ruby twitter_oauth Akita.m 2011.1.19
  • @slope_akita • @gutskun
  • http://d.hatena.ne.jp/gutskun/20101230/1293677137 • bot • PIN • bot
  • bot• twitter• • gmail • foo + bar @gmail.com ( 1) • ( 2)
  • • @gutskun• > > ( )
  • •• Read & Write
  • • Consumer key• Consumer secret
  • 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
  • • bot• url• PIN
  • • Access Token • Access SecretPIN> 2110088Authorized: trueAccess Token: 231715650-q5jtdKlpxWT2cEk7VFgi2H40jdxEniaMCX3z6EtaAccess Secret: E3jZlem4PlhsacJULpCCK99TlaIOuFixKix81Nyp5SI
  • 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’)
  • ••
  • ••
  • • (Ruby)•