SlideShare uma empresa Scribd logo
1 de 16
Baixar para ler offline
Twitter4Rでつくる
ゆるふわ愛され
Twitter bot
Lovable Twitter Bot Development
with Twitter4R
2008-08-23 Ruby勉強会@札幌-9

        日本Rubyの会
        Ruby札幌
                    しだら ようじ
                      SHIDARA Yohji
ゴール
Twitter bot をつくる
twitter.com
「いまなにしてる?」で繋がる
 コミュニケーションツール
http://twitter.com/darashi
bot
buzztter bot (http://twitter.com/buzztter)
Twitter4Rを使うと簡単
http://twitter4r.rubyforge.org/
インストール




‣ gem install twitter4r
#!/usr/bin/env ruby


require 'time'
# ↑これがないと Twitter::Client#status で
# エラーが発生する (Twitter4R 0.3.0時点)

require 'rubygems'
require 'twitter'


client = Twitter::Client.new(
             :login => ログイン名,
             :password => パスワード)
             )


client.status(:post, "Hello, world!")
これだけ!
Pitを使うと ...
#!/usr/bin/env ruby


require 'time'
# ↑これがないと Twitter::Client#status で
# エラーが発生する (Twitter4R 0.3.0時点)

require 'rubygems'
require 'twitter'
require 'pit'


config = Pit.get('twitter')
client = Twitter::Client.new(config)


client.status(:post, "Hello, world!")
これだけ!

Mais conteúdo relacionado

Semelhante a Twitter4Rでつくるゆるふわ愛されTwitter bot

20 lingrbot
20 lingrbot20 lingrbot
20 lingrbotrarere
 
python-twitterを用いたTwitterデータ収集
python-twitterを用いたTwitterデータ収集python-twitterを用いたTwitterデータ収集
python-twitterを用いたTwitterデータ収集Hikaru Takemura
 
Twitter4jハンズオン 5/1 #twtr_hack
Twitter4jハンズオン 5/1 #twtr_hackTwitter4jハンズオン 5/1 #twtr_hack
Twitter4jハンズオン 5/1 #twtr_hackYusuke Yamamoto
 
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hackyut148atgmaildotcom
 
Google SpreadSheetでtwitter bot作ったよ
Google SpreadSheetでtwitter bot作ったよGoogle SpreadSheetでtwitter bot作ったよ
Google SpreadSheetでtwitter bot作ったよKeisuke Oohata
 

Semelhante a Twitter4Rでつくるゆるふわ愛されTwitter bot (7)

20100703devdo
20100703devdo20100703devdo
20100703devdo
 
20 lingrbot
20 lingrbot20 lingrbot
20 lingrbot
 
python-twitterを用いたTwitterデータ収集
python-twitterを用いたTwitterデータ収集python-twitterを用いたTwitterデータ収集
python-twitterを用いたTwitterデータ収集
 
Bot Framework v4 開発 Tips 2018-11
Bot Framework v4  開発 Tips 2018-11Bot Framework v4  開発 Tips 2018-11
Bot Framework v4 開発 Tips 2018-11
 
Twitter4jハンズオン 5/1 #twtr_hack
Twitter4jハンズオン 5/1 #twtr_hackTwitter4jハンズオン 5/1 #twtr_hack
Twitter4jハンズオン 5/1 #twtr_hack
 
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
配布用Dotcloudによるすぐ始めるtwitterwebアプリ開発#twtr hack
 
Google SpreadSheetでtwitter bot作ったよ
Google SpreadSheetでtwitter bot作ったよGoogle SpreadSheetでtwitter bot作ったよ
Google SpreadSheetでtwitter bot作ったよ
 

Mais de Yoji Shidara

絵文字Ruby: From Sapporo.rb with Love for Emoji.
絵文字Ruby: From Sapporo.rb with Love for Emoji.絵文字Ruby: From Sapporo.rb with Love for Emoji.
絵文字Ruby: From Sapporo.rb with Love for Emoji.Yoji Shidara
 
Jpmobile: Who I Wanna Be And Who I Am
Jpmobile: Who I Wanna Be And Who I AmJpmobile: Who I Wanna Be And Who I Am
Jpmobile: Who I Wanna Be And Who I AmYoji Shidara
 
Building Static Website With Github And Jekyll
Building Static Website With Github And JekyllBuilding Static Website With Github And Jekyll
Building Static Website With Github And JekyllYoji Shidara
 
From Japanese mobile-web world, to Latin-1 developers. (a part of "East Meets...
From Japanese mobile-web world, to Latin-1 developers. (a part of "East Meets...From Japanese mobile-web world, to Latin-1 developers. (a part of "East Meets...
From Japanese mobile-web world, to Latin-1 developers. (a part of "East Meets...Yoji Shidara
 
The Way We Are Working On Our Website @とちぎRuby会議02
The Way We Are Working On Our Website @とちぎRuby会議02The Way We Are Working On Our Website @とちぎRuby会議02
The Way We Are Working On Our Website @とちぎRuby会議02Yoji Shidara
 
Sinatraで鼻歌まじりのWeb開発
Sinatraで鼻歌まじりのWeb開発Sinatraで鼻歌まじりのWeb開発
Sinatraで鼻歌まじりのWeb開発Yoji Shidara
 
SAPICAの利用履歴を可視化する
SAPICAの利用履歴を可視化するSAPICAの利用履歴を可視化する
SAPICAの利用履歴を可視化するYoji Shidara
 
Ruby on Rails でつくるアタシ好みの愛され Web サービス
Ruby on Rails でつくるアタシ好みの愛され Web サービスRuby on Rails でつくるアタシ好みの愛され Web サービス
Ruby on Rails でつくるアタシ好みの愛され Web サービスYoji Shidara
 
RubyKaigi2008弾丸レポート / ガラパゴスに線路を敷こう
RubyKaigi2008弾丸レポート / ガラパゴスに線路を敷こうRubyKaigi2008弾丸レポート / ガラパゴスに線路を敷こう
RubyKaigi2008弾丸レポート / ガラパゴスに線路を敷こうYoji Shidara
 
ガラパゴスに線路を敷こう: 携帯電話用RailsプラグインJpmobile
ガラパゴスに線路を敷こう: 携帯電話用RailsプラグインJpmobileガラパゴスに線路を敷こう: 携帯電話用RailsプラグインJpmobile
ガラパゴスに線路を敷こう: 携帯電話用RailsプラグインJpmobileYoji Shidara
 
Twitter分散クロールの野望
Twitter分散クロールの野望Twitter分散クロールの野望
Twitter分散クロールの野望Yoji Shidara
 
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力Yoji Shidara
 
Rubyistからみたsoupcurry.info
Rubyistからみたsoupcurry.infoRubyistからみたsoupcurry.info
Rubyistからみたsoupcurry.infoYoji Shidara
 

Mais de Yoji Shidara (14)

20100721 Buzztter
20100721 Buzztter20100721 Buzztter
20100721 Buzztter
 
絵文字Ruby: From Sapporo.rb with Love for Emoji.
絵文字Ruby: From Sapporo.rb with Love for Emoji.絵文字Ruby: From Sapporo.rb with Love for Emoji.
絵文字Ruby: From Sapporo.rb with Love for Emoji.
 
Jpmobile: Who I Wanna Be And Who I Am
Jpmobile: Who I Wanna Be And Who I AmJpmobile: Who I Wanna Be And Who I Am
Jpmobile: Who I Wanna Be And Who I Am
 
Building Static Website With Github And Jekyll
Building Static Website With Github And JekyllBuilding Static Website With Github And Jekyll
Building Static Website With Github And Jekyll
 
From Japanese mobile-web world, to Latin-1 developers. (a part of "East Meets...
From Japanese mobile-web world, to Latin-1 developers. (a part of "East Meets...From Japanese mobile-web world, to Latin-1 developers. (a part of "East Meets...
From Japanese mobile-web world, to Latin-1 developers. (a part of "East Meets...
 
The Way We Are Working On Our Website @とちぎRuby会議02
The Way We Are Working On Our Website @とちぎRuby会議02The Way We Are Working On Our Website @とちぎRuby会議02
The Way We Are Working On Our Website @とちぎRuby会議02
 
Sinatraで鼻歌まじりのWeb開発
Sinatraで鼻歌まじりのWeb開発Sinatraで鼻歌まじりのWeb開発
Sinatraで鼻歌まじりのWeb開発
 
SAPICAの利用履歴を可視化する
SAPICAの利用履歴を可視化するSAPICAの利用履歴を可視化する
SAPICAの利用履歴を可視化する
 
Ruby on Rails でつくるアタシ好みの愛され Web サービス
Ruby on Rails でつくるアタシ好みの愛され Web サービスRuby on Rails でつくるアタシ好みの愛され Web サービス
Ruby on Rails でつくるアタシ好みの愛され Web サービス
 
RubyKaigi2008弾丸レポート / ガラパゴスに線路を敷こう
RubyKaigi2008弾丸レポート / ガラパゴスに線路を敷こうRubyKaigi2008弾丸レポート / ガラパゴスに線路を敷こう
RubyKaigi2008弾丸レポート / ガラパゴスに線路を敷こう
 
ガラパゴスに線路を敷こう: 携帯電話用RailsプラグインJpmobile
ガラパゴスに線路を敷こう: 携帯電話用RailsプラグインJpmobileガラパゴスに線路を敷こう: 携帯電話用RailsプラグインJpmobile
ガラパゴスに線路を敷こう: 携帯電話用RailsプラグインJpmobile
 
Twitter分散クロールの野望
Twitter分散クロールの野望Twitter分散クロールの野望
Twitter分散クロールの野望
 
Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力Pluginが広げるRailsの魅力
Pluginが広げるRailsの魅力
 
Rubyistからみたsoupcurry.info
Rubyistからみたsoupcurry.infoRubyistからみたsoupcurry.info
Rubyistからみたsoupcurry.info
 

Twitter4Rでつくるゆるふわ愛されTwitter bot