-
-
Save cocoatomo/2259087 to your computer and use it in GitHub Desktop.
twitter name card
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 language="java" import="twitter4j.*,java.util.List" contentType="text/html; charset=UTF-8" session="false" %> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html;charset=UTF-8"> | |
</head> | |
<style> | |
.username { | |
font-size: 12pt; | |
} | |
.description{ | |
font-size: 8pt; | |
} | |
.avatar { | |
width: 75px; | |
height: 75px; | |
} | |
.card { | |
height: 193px; | |
width: 50%; | |
} | |
td{ | |
padding-left:3mm; | |
padding-right:3mm; | |
word-break: break-all; | |
} | |
</style> | |
<% | |
String[] screenNames = {"twtrfk", "sue445", "Mocel", "bina1204", "inda_re", "kimukou2628", "yut148", "allsymphony", "7pairs", "ebc_2in2crc", "kaz_nomura", "eslar", "sakura_bird1", "setomits", "trashbasket", "Shohei Michiwaki", "xtetsuji", "Shinichi Fujikawa", "johtani", "nishikokura hironobu", "jacotan", "sassy_watson", "yukki0709", "ryanpapa860", "jagd5168", "fine3152", "yoshio90", "wackey", "IIJIMAS", "kky0suke", "fuminishino", "iMaX_20101103", "shohhei1126", "i2key", "joe_uragami", "hideaki_t", "criticabug", "idamaiko", "komari", "ngsw_taro", "ENO0514", "taka_waihey", "wadakooo", "takuyanoguchi", "hinoX0", "okumin", "doenis05", "_ishkawa", "ainame", "kouuuu99", "tomato360"}; | |
Twitter twitter = new TwitterFactory().getInstance(); | |
List<User> users = twitter.lookupUsers(screenNames); | |
%> | |
</html> | |
<body style="margin-left: 10mm;margin-right: 10mm"> | |
<table width="100%" border="0" cellspacing="0"> | |
<% | |
for (int i = 0; i < users.size(); i++) { | |
User user = users.get(i); | |
%> | |
<%=i != 0 && i % 2 == 0 ? "</tr>" : ""%> | |
<%=i != 0 && i % 10 == 0 ? "</table><table width='100%' border='0' cellspacing='0' style='page-break-before:always'>":""%> | |
<%=i % 2 == 0 ? "<tr>" : ""%> | |
<td class="card"> | |
<img align="left" src="<%=user.getProfileImageURL()%>" | |
class="avatar"><span class="username">@<%=user.getScreenName()%></span> <span class="description"><%=user.getName()%><br> | |
<%=user.getDescription()%></span> | |
</td> | |
<% | |
} | |
%> | |
</table> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment