Created
December 7, 2012 12:29
-
-
Save phstudy/4232986 to your computer and use it in GitHub Desktop.
Twitter4j Scriptlet version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page contentType="text/html;charset=UTF-8" language="java" %> | |
<%@ page import="twitter4j.Twitter"%> | |
<html> | |
<head> | |
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> | |
<title>Sign in with Twitter example</title> | |
</head> | |
<body> | |
<% | |
if(null == session.getAttribute("twitter")) { | |
%> | |
<a href="signin"><img src="./images/Sign-in-with-Twitter-darker.png"/></a> | |
<% | |
} | |
if(null != session.getAttribute("twitter")) { | |
Twitter twitter = (Twitter)session.getAttribute("twitter"); | |
%> | |
<h1>Welcome <%=twitter.getScreenName()%> (<%=twitter.getId()%>)</h1> | |
<form action="./post" method="post"> | |
<textarea cols="80" rows="2" name="text"></textarea> | |
<input type="submit" name="post" value="update"/> | |
</form> | |
<a href="./logout">logout</a> | |
<% | |
} | |
%> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment