Integrating Twitter via Java
This you want to integrate to Twitter from Java you can use the following library JTwitter.
Try out the twitter integration with the following coding:
package de.vogella.twitter.test;
import java.util.List;
import winterwell.jtwitter.Twitter;
import winterwell.jtwitter.Twitter.User;
public class TwitterTest {
private static final String user ="your-user";
private static final String pw ="your-password";
public static void main(String[] args) {
// Make a Twitter object
Twitter twitter = new TwitterFactory().getInstance(user,pw);
// Print Lars Vogel status
System.out.println(twitter.getStatus("vogella"));
// Set my status
twitter.setStatus("@vogella messing with Twitter in Java");
List<User> followers = twitter.getFollowers();
for (User user : followers) {
System.out.println(user.getName());
}
}
}
Another Java Twitter Library is Twitter4J.
February 15th, 2010 at 11:10 pm
Hi Lars,
Have you written any Java application using Facebook? What libraries do you need and do you have any sample code?
Thanks,
Meera
February 15th, 2010 at 11:15 pm
@Meera: No, so far I have not develop for Facebook
February 25th, 2010 at 7:11 am
@Meera: You can develop Java application which connects to Facebook using the facebook-java-api project hosted on Google Code [http://code.google.com/p/facebook-java-api/]. Te only thing is Facebook does not support this project officially because of which the APIs are updated once in a while only.
February 25th, 2010 at 7:17 am
@Meera: You can check this tutorial for details: http://blog.theunical.com/facebook-integration/facebook-java-api-example-to-publish-on-wall/
October 22nd, 2010 at 10:28 am
wow..superb.
just sent my first tweet using these library
=)