README.md in fluent-plugin-twitter-0.3.2 vs README.md in fluent-plugin-twitter-0.4.0
- old
+ new
@@ -6,54 +6,62 @@
## Dependency
before use, install dependent library as:
-```bash
+```
# for RHEL/CentOS
-$ sudo yum install openssl-devel
+$ sudo yum -y install openssl-devel libcurl libcurl-devel
# for Ubuntu/Debian
$ sudo apt-get install libssl-dev
```
## Installation
-### native gem
+install with `gem` or `fluent-gem` command as:
-`````
-gem install fluent-plugin-twitter
-`````
+```
+# for fluentd
+$ gem install eventmachine
+$ gem install fluent-plugin-twitter
-### td-agent gem
-`````
-/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-twitter
-`````
+# for td-agent
+$ sudo /usr/lib64/fluent/ruby/bin/fluent-gem install eventmachine
+$ sudo /usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-twitter
+# for td-agent2
+$ sudo td-agent-gem install eventmachine
+$ sudo td-agent-gem install fluent-plugin-twitter
+```
+
## Input Configuration
### Input Sample
+
`````
<source>
type twitter
consumer_key YOUR_CONSUMER_KEY # Required
consumer_secret YOUR_CONSUMER_SECRET # Required
oauth_token YOUR_OAUTH_TOKEN # Required
oauth_token_secret YOUR_OAUTH_TOKEN_SECRET # Required
tag input.twitter.sampling # Required
- timeline sampling # Required (sampling or userstream)
- keyword Ruby,Python # Optional
+ timeline tracking # Required (tracking or sampling or userstream)
+ keyword Ruby,Python # Optional (keyword is priority than follow_ids)
+ follow_ids 14252,53235 # Optional (integers, not screen names)
lang ja,en # Optional
output_format nest # Optional (nest or flat or simple[default])
</source>
<match input.twitter.sampling>
type stdout
</match>
`````
-### Debug
+### Testing
+
`````
$ tail -f /var/log/td-agent/td-agent.log
`````
## Output Configuration
@@ -72,11 +80,12 @@
access_token YOUR_OAUTH_TOKEN
access_token_secret YOUR_OAUTH_TOKEN_SECRET
</match>
`````
-### Debug
+### Testing
+
`````
$ curl http://localhost:8888/notify.twitter -F 'json={"message":"foo"}'
`````
## Reference
@@ -86,17 +95,11 @@
### Quick Tour to count a tweet with fluent-plugin-twitter and fluent-plugin-datacounter
http://qiita.com/items/fe4258b394190f23fece
## TODO
-* support fetching twitter search
-* support fetching specific user userstream
patches welcome!
-
-## Known Issue
-On starting fluentd, appearing alert message below. Please tell me how to fix up.
-`/usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/lib/eventmachine.rb:1530: warning: already initialized constant EM`
## Copyright
Copyright © 2012- Kentaro Yoshida (@yoshi_ken)