高音拖缆
Connects to a Twitter™ stream and outputs a new feature for each tweet. The transformer allows users to set up a filter, so that the output features will only contain tweets containing certain keywords, tweets that are geotagged with a particular location, and/or tweets which are written in particular languages.
twitter流是一个永不关闭的HTTP连接,所以除了错误情况,任何包含此转换器的工作区都不会自行终止。转换器将继续输出特性,直到用户终止工作区。
必须至少有一个特性进入转换器才能启动流。一旦所有的输入特性都到达,transformer将打开到Twitter流API的连接,并开始输出特性。根据变压器参数中设置的滤波器,变压器的输出可能不连续。在某些时段内,可能没有与过滤器匹配的tweet。在按语言和几何过滤时尤其如此。
如果没有提供关键字或几何过滤器,转换器将连接到样本流。这个流提供了tweet创建时的随机样本。可以按语言过滤此流。
Note that a limited number of streaming connections is permitted per user. If too many simultaneous connections are attempted with the same user credentials, one or more of the connections will be terminated.
Output Ports
The transformer will output a new feature for each tweet received from the twitter streaming API. Each output feature will contain several attributes:
_推文id: The identification number of the tweet.
_tweet_status:tweet的文本。
_tweet_username:编写tweet的Twitter用户的用户名。
_推特创建于:创建推文的日期和时间。这将被格式化为标准的FME日期/时间格式:YYYYMMDDHHMMSS
_推特搜索结果:tweet的JSON文本。可以使用JSONFragmenter和JSONExtractor公司transformers.
The Twitter streaming API will periodically return messages which are not tweets. For example, these messages could contain information on rate limiting or deleted messages. More information can be found here:http://dev.twitter.com/docs/streaming-api/messages
One feature will be output through this port for each non-tweet message returned from the Twitter streaming API. Each of these features will have a_推特搜索结果attribute, which will contain the JSON object representation of the message. This object can be examined in Workbench using the JSON transformers.
Parameters
流过滤器参数
This parameter is used to filter the stream for tweets which contain the given keywords. For each input feature, the value should contain a space separated list of keywords. If a tweet contains all of the keywords from any single feature, it will be returned by the stream.
For example, if one feature provides the keywords “FME Workbench” while a second provides “safe”, the following tweets could be matched:
- 工作台
- Safe Software
The following tweets would NOT be matched:
- Twitter工作台
- FME
关键字不区分大小写匹配。此外,如果关键字包含在Twitter用户名、链接的URL或Twitter标签中,那么它们将被匹配。有关详细信息,请参阅http://dev.twitter.com/docs/streaming-apis/parameters#track
此参数可用于将tweet限制为所选语言。如果未选择任何语言,则流式推文可以使用任何语言。
如果此参数设置为是的将计算每个输入特征的边界框,并且tweet流将被限制为地理标记的tweet,并且其坐标落在其中一个边界框内。
此参数仅在按几何体过滤流时生效。由于流需要边界框,因此此参数确定将用于点几何图形的边界框的大小。
身份验证参数
Note:要使用代理服务器在网络外部进行访问,请使用FME选项中的网络工具。从Workbench菜单中,选择工具>FME选项>网络. For more information, see "Network" in the FME Workbench Help.
需要有效的Twitter用户名和密码才能访问Twitter流API。
相关变压器
编辑变压器参数
使用一组菜单选项,可以通过引用工作空间中的其他元素来指定转换器参数。更高级的功能,如高级编辑器和算术编辑器,也可以在一些变压器。要访问这些选项的菜单,请单击在适用参数旁边。有关详细信息,请参阅变压器参数菜单选项.
变压器类别
搜索FME知识中心
在上搜索有关此变压器的示例和信息FME Knowledge Center.