Skip to content

Instantly share code, notes, and snippets.

@stliu
Created June 24, 2011 08:16
Show Gist options
  • Save stliu/1044428 to your computer and use it in GitHub Desktop.
Save stliu/1044428 to your computer and use it in GitHub Desktop.
public class Test {
/**
* 获取最新更新的公共微博消息
*
* @param args
*/
public static void main(String[] args) throws Throwable {
System.setProperty( "weibo4j.oauth.consumerKey", STLIU.CONSUMER_KEY );
System.setProperty( "weibo4j.oauth.consumerSecret", STLIU.CONSUMER_SECRET );
getWeibo().verifyCredentials();
}
private static Weibo getWeibo() {
Weibo weibo = new Weibo();
weibo.setToken( STLIU.CONSUMER_KEY, STLIU.CONSUMER_SECRET );
return weibo;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment