找不到符号 getHomeTimeline()
我正在尝试使用以下代码在我开始使用的 JSP 测试页面上使用 Twitter4J :
<%-- Includes --%>
<%@page import="twitter4j.Status"%>
<%@page import="java.util.List"%>
<%@page import="twitter4j.TwitterFactory"%>
<%@page import="twitter4j.Twitter"%>
<%@page import="twitter4j.api.TimelineMethods"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
<%
Twitter twitter = new TwitterFactory().getInstance();
List<Status> statuses = getHomeTimeline();
%>
</body>
</html>
问题是 Netbeans 告诉我在第 19 行(getHomeTimeline
一行)他找不到该符号。我应该做什么来纠正这个问题?
I'm trying to use the Twitter4J on a JSP test page that I'm beginning to work with, using this code:
<%-- Includes --%>
<%@page import="twitter4j.Status"%>
<%@page import="java.util.List"%>
<%@page import="twitter4j.TwitterFactory"%>
<%@page import="twitter4j.Twitter"%>
<%@page import="twitter4j.api.TimelineMethods"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
<%
Twitter twitter = new TwitterFactory().getInstance();
List<Status> statuses = getHomeTimeline();
%>
</body>
</html>
The problem is that Netbeans is telling me that at the line 19(the getHomeTimeline
one) he can't find the symbol. What should I do to correct this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不应该是 twitter.getHomeTimeLine(); 吗?
Shouldn't it be
twitter.getHomeTimeLine();
?