code=https://api.weibo.com/oauth2/authorize?client_id=1458508643&redirect_uri=http://127.0.0.1/callback.jsp&response_type=code Hit enter when it's done.[Enter]:
packageweibo4j.examples.timeline;
importweibo4j.Timeline;
importweibo4j.Weibo;
importweibo4j.examples.oauth2.Log;
importweibo4j.model.Status;
importweibo4j.model.WeiboException;
publicclassUpdateStatus {
publicstaticvoidmain(String[] args) {
String access_token = "2.00lBvA1CxikhaBfbc0d2a0c10FWttI";
String statuses = "此条微博来自星光发布系统发布";
Weibo weibo = newWeibo();
weibo.setToken(access_token);
Timeline tm = newTimeline();
try{
Status status = tm.UpdateStatus(statuses);
Log.logInfo(status.toString());
} catch(WeiboException e) {
e.printStackTrace();
} }
}
package weibo4j.examples.timeline;
import weibo4j.Timeline;
import weibo4j.Weibo;
import weibo4j.examples.oauth2.Log;
import weibo4j.model.Status;
import weibo4j.model.WeiboException;
public class UpdateStatus {
public static void main(String[] args) {
String access_token = "2.00lBvA1CxikhaBfbc0d2a0c10FWttI";
String statuses = "此条微博来自星光发布系统发布";
Weibo weibo = new Weibo();
weibo.setToken(access_token);
Timeline tm = new Timeline();
try {
Status status = tm.UpdateStatus(statuses);
Log.logInfo(status.toString());
} catch (WeiboException e) {
e.printStackTrace();
} }
}
{"error":"applications over the unaudited use restrictions!","error_code":21321,"request":"/2/statuses/update.json"}
eibo4j.model.WeiboException: 403:The request is understood, but it has been refused. An accompanying error message will explain why.
error:applications over the unaudited use restrictions! error_code:21321/2/statuses/update.json
at weibo4j.http.HttpClient.httpRequest(HttpClient.java:414)
at weibo4j.http.HttpClient.httpRequest(HttpClient.java:372)
at weibo4j.http.HttpClient.post(HttpClient.java:301)
at weibo4j.http.HttpClient.post(HttpClient.java:286)
at weibo4j.Timeline.UpdateStatus(Timeline.java:708)
at weibo4j.examples.timeline.UpdateStatus.main(UpdateStatus.java:18)
{"error":"applications over the unaudited use restrictions!","error_code":21321,"request":"/2/statuses/update.json"}
weibo4j.model.WeiboException: 403:The request is understood, but it has been refused. An accompanying error message will explain why.
error:applications over the unaudited use restrictions! error_code:21321/2/statuses/update.json
at weibo4j.http.HttpClient.httpRequest(HttpClient.java:414)
at weibo4j.http.HttpClient.httpRequest(HttpClient.java:372)
at weibo4j.http.HttpClient.post(HttpClient.java:301)
at weibo4j.http.HttpClient.post(HttpClient.java:286)
at weibo4j.Timeline.UpdateStatus(Timeline.java:708)
at weibo4j.examples.timeline.UpdateStatus.main(UpdateStatus.java:18)
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有