【发布时间】:2023-03-21 01:10:01
【问题描述】:
我遵循HBC 的快速入门,并设法从 Twitter 流中获取了一些推文,指定了一些跟踪条款,代码如下:
/** Declare the host you want to connect to, the endpoint, and authentication (basic auth or oauth) */
Hosts hosebirdHosts = new HttpHosts(Constants.STREAM_HOST);
StreamingEndpoint endpoint = new StatusesFilterEndpoint();
// Optional: set up some followings and track terms
List<Long> followings = Lists.newArrayList(1234L, 566788L);
List<String> terms = Lists.newArrayList("twitter", "api");
endpoint.followings(followings);
endpoint.trackTerms(terms);
是否可以在不指定任何跟踪条件的情况下使用 Hbc 获取 twitter 流?
我只是尝试删除行 "endpoint.trackTerms(terms);" 但这样做不起作用。
帮我!谢谢!
【问题讨论】:
标签: java twitter twitter-streaming-api twitter-hbc