Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a32e6f6

Browse files
author
Roger Hughes
committed
More initial setup
1 parent 5a9488d commit a32e6f6

File tree

3 files changed

+45
-7
lines changed

3 files changed

+45
-7
lines changed

social-samples/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<org.aspectj-version>1.6.9</org.aspectj-version>
1414
<org.slf4j-version>1.5.10</org.slf4j-version>
1515
<spring-social.version>1.0.2.RELEASE</spring-social.version>
16-
<org.springframework.social-version>1.0.2.RELEASE</org.springframework.social-version>
16+
<org.springframework.social-twitter-version>1.0.2.RELEASE</org.springframework.social-twitter-version>
1717
</properties>
1818
<dependencies>
1919
<!-- Spring -->
@@ -134,8 +134,8 @@
134134
<!-- Twitter API -->
135135
<dependency>
136136
<groupId>org.springframework.social</groupId>
137-
<artifactId>spring-social-web</artifactId>
138-
<version>${org.springframework.social-version}</version>
137+
<artifactId>spring-social-twitter</artifactId>
138+
<version>${org.springframework.social-twitter-version}</version>
139139
</dependency>
140140

141141
</dependencies>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
*
3+
*/
4+
package com.captaindebug.social.twittertimeline;
5+
6+
import javax.inject.Inject;
7+
8+
import org.slf4j.Logger;
9+
import org.slf4j.LoggerFactory;
10+
import org.springframework.social.twitter.api.Twitter;
11+
import org.springframework.stereotype.Controller;
12+
import org.springframework.ui.Model;
13+
14+
/**
15+
* @author Roger
16+
*
17+
* Created 10:40:52 PM Jun 9, 2012
18+
*
19+
*/
20+
@Controller
21+
public class TwitterTimeLineController {
22+
23+
private static final Logger logger = LoggerFactory.getLogger(TwitterTimeLineController.class);
24+
25+
private final Twitter twitter;
26+
27+
@Inject
28+
public TwitterTimeLineController(Twitter twitter) {
29+
this.twitter = twitter;
30+
}
31+
32+
public String getUserTimeline(Model model) {
33+
34+
return "timeline";
35+
}
36+
37+
}

social-samples/src/main/webapp/WEB-INF/views/home.jsp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
<title>Home</title>
66
</head>
77
<body>
8-
<h1>
9-
Hello world!
10-
</h1>
8+
<h1>Captain Debug's Social Samples</h1>
119

12-
<P> The time on the server is ${serverTime}. </P>
10+
<P>
11+
<a href=timeline?id=BBCBreaking>Grab Twitter User Time Line for @BBCBreaking</a>
12+
13+
</P>
1314
</body>
1415
</html>

0 commit comments

Comments
 (0)