Twitterã§ä½ãããBotã®ä½ããã æºåç·¨
Twitter APIãç°¡åã«å©ããPerlã®Net::Twitterã¢ã¸ã¥ã¼ã«ã使ãã¾ãã
â»ç¾å¨ã¯ãTwitterã®èªè¨¼æ¹å¼ãOAuthããã³xAuthã®ã¿ã«ãªã£ããããBASICèªè¨¼ã§ã®Botä½æã¯ã§ãã¾ãããNet::Twitter ::Liteã¨ãããããã§ããã http://tech.bayashi.jp/archives/entry/perl/2010/003016.html
ç°å¢ã¯VMWare Serverä¸ã®CentOS 5.2ã使ã£ã¦ã¾ããSSHã§ãã¹ãPCãå¤é¨ããæ¥ç¶ããå ´åã«ã¯ãPort22ã«å¯¾ããNAT/Port Forwardingã®è¨å®ã¨Windowsãã¡ã¤ã¢ã¦ã©ã¼ã«ã®è¨å®ãå¿ããã«ã
ã¾ãã¯å¿ è¦ãªã¢ã¸ã¥ã¼ã«ã®ã¢ãããã¼ãã¨ã¤ã³ã¹ãã¼ã«ããã¾ããããyum-fastestmirrorããªãã¨yumãã¤ããã®ã§æåã«yumã®ã¢ãããã¼ãã ããã¦ãããªã©ã
yum update yum
yum update perl
perl -MCPAN -e shell
$ install Net::Twitter
å¿ è¦ã«å¿ãã¦ä¸è¨ã®ã¢ã¸ã¥ã¼ã«ãå ¥ãã¾ãããã
ã¡ã«ã»ã³ããã¤ã¹ã¿ã§ä¹±æ°ãçºçãããããã®ã¢ã¸ã¥ã¼ã«
$ install Math::Random::MT
use Math::Random::MT qw(srand rand); ã¨ãã¦æ¨æºã®rand/srandã®ä»£ããã«ä½¿ãã
RDBMS(PostgreSQLã¨ãMySQLã¨ã)ã使ãã¤ãããªã
$ install DBI
$ install DBD::Pg (PostgreSQLã®å ´å)
ããã¾ã§ããã®ã¯é¢åã§ããGDBM_Fileã¨ãData::DumperãStorableã¿ãããªéå»ã®çºè¨ãããç¨åº¦ä¿åãã¦ãããä»çµã¿ã¯å¿ è¦ã«ãªã£ã¦ããããããã¾ããã
ãã¨ã¯Net::Twitterã®APIä»æ§ãçºãã¦ããã°OKã§ãï¼
http://search.cpan.org/~cthom/Net-Twitter/lib/Net/Twitter.pm
hashref(é£æ³é å)ã®ä½¿ãæ¹ã¯ã¡ããã¨ç¢ºèªãã¦ããã¾ãããï¼ï¼