Showing posts with label social media. Show all posts
Showing posts with label social media. Show all posts

Monday, January 17, 2011

Simple Spring Social for Twitter Friends

The Spring Social project provides us developers with an easy way to interact with Twitter, Facebook, LinkedIn & TripIt via the familiar Template objects we have used. Spring has provided Templates for convenient interaction with JDBC, REST, Hibernate, JNDI, and more.


One of the simplest social media calls is to lookup someone's Twitter friends with the TwitterTemplate.


1. Add the Spring Social project dependency to the pom.xml file


<dependencies>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-core</artifactId>
<version>${spring.social.version}</version>
</dependency>
...
</dependencies>

2. Add the Spring Milestone Repository repository to the pom.xml file



<repositories>
<repository>
<id>spring-maven-milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository><
...
</repositories>

3. Create the TwitterTemplate, and ask for friends


TwitterTemplate twitterTemplate = new TwitterTemplate();
List<String> friends = twitterTemplate.getFriends("chariotsolution");
for (String friend : friends) {
System.out.println("Friend: " + friend);
}

4. Use the code above anywhere in your application


In the next blog, I will cover how to use Open Authentication (OAuth) to perform more Twitter operations.

Friday, September 11, 2009

Social Media and the Technologist

Yesterday, Skip Shuda and Marilyn Moran, of Team and a Dream, stopped by our offices to discuss social media and what it means to Chariot's team members. We reviewed some of the basics, but also discussed why a person in the technical field should care.

After our meeting, they sat down for an interview with Ken Rimple. Also, note the video shot is not shaking this time. We now have a tripod!