public static void main(String[] args) {
// TODO Auto-generated method stub
Weibo weibo = new Weibo();
weibo.setOAuthConsumer("2281630535", "a84c938fe731c9830ee66b72c0f1ef65");
try {
RequestToken requestToken = weibo.getOAuthRequestToken();
System.out.println(requestToken.getAuthenticationURL());
String oauth_verifier = new Scanner(System.in).nextLine();
AccessToken accessToken = weibo.getOAuthAccessToken(requestToken, oauth_verifier);
weibo.setOAuthAccessToken(accessToken);
System.out.println(weibo.updateStatus("hello,world"));
} catch (WeiboException e) {
e.printStackTrace();
}
}
新浪微博发表
最新推荐文章于 2025-08-05 10:19:15 发布