2009年11月29日日曜日

Twitter Stream APIで特定のキーワードの Tweetを受信する

track

Specifies keywords to track. Keywords are specified by a comma separated list. Queries are subject to Track Limitations, described in Track Limiting and subject to access roles, describe in the statuses/filter method. Track keywords are case-insensitive logical ORs. Terms are exact-matched, and also exact-matched ignoring punctuation. Phrases, keywords with spaces, are not supported. Keywords containing punctuation will only exact match tokens. Some UTF-8 keywords will not match correctly- this is a known temporary defect.

 

Track examples: The keyword Twitter will match all public statuses with the following comma delimited tokens in their text field: TWITTER, twitter, "Twitter", twitter., #twitter and @twitter. The following tokens will not be matched: TwitterTracker and http://www.twitter.com,  The phrase, excluding quotes, "hard alee" won't match anything. The keyword "helm's-alee" will match helm's-alee but not #helm's-alee.

 

Values: Strings separated by commas. Each string must be between 1 and 30 bytes, inclusive.

Methods: statuses/filter

Example: Create a file called 'tracking' that contains, exactly and excluding the quotation marks: "track=basketball,football,baseball,footy,soccer". Execute: curl -d @tracking http://stream.twitter.com/1/statuses/filter.json -uAnyTwitterUser:Password.You will receive JSON updates about various crucial sportsball topics and events.

1つのキーワードにつき30バイトまで。キーワード数は200まで。
昔は日本語駄目だったけど今は堂なんだろう?

via ひひーん!

0 件のコメント:

ブログ アーカイブ

カテゴリー