SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
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!")
これだけ!

Más contenido relacionado

Similar 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
 

Similar 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作ったよ
 

Más 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
 

Más 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
 

Último

SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 

Último (10)

SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 

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