안녕하세요, 저는 트위터 API twitter4j에서 일하고 있습니다. 내 자바 코드에 의해 내 트위터 계정에 Twitt을 보내려하지만 난 컴파일 할 때 난 내가 내를 컴파일 할 때 내 자바 코드 난에 geting하고자바 코드로 트위터의 정보를 잘못 했습니까?
public class entry {
public static void main(String ar[])throws TwitterException, IOException
{
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(true);
cb.setOAuthConsumerKey("dJGC64ozxFNfs7D3LK07oA");
cb.setOAuthConsumerSecret("ExvnfE8AOM5vjqdjANoRdZyLKSOo2LZyHnxo2ERWzOs");
cb .setOAuthAccessToken("*****************************");
cb.setOAuthAccessTokenSecret("**************************");
Twitter tf=new TwitterFactory(cb.build()).getInstance();
tf.updateStatus("test ! ");
}
}
오류를 을 이해 해달라고 몇 가지 오류 코드 :
Exception in thread "main" A JSONObject text must begin with '{' found:
at 2 [character 3 line 1]
Relevant discussions can be found on the Internet at:
http://www.google.co.jp/search?q=6f994c35 or
TwitterException{exceptionCode=[6f994c35-006e990b 1b2aeabf-9f2c6cb7], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=3.0.3}
at twitter4j.internal.http.HttpResponse.asJSONObject(HttpResponse.java:153)
at twitter4j.internal.json.StatusJSONImpl.<init>(StatusJSONImpl.java:66)
at twitter4j.internal.json.z_T4JInternalJSONImplFactory.createStatus(z_T4JInternalJSONImplFactory.java:69)
at twitter4j.TwitterImpl.updateStatus(TwitterImpl.java:241)
at twiterapplication.entry.main(entry.java:29)
Caused by: twitter4j.internal.org.json.JSONException: A JSONObject text must begin with '{' found:
http://www.google.co.jp/search?q=006e990b
'entry.java'의 29 행은 어느 것입니까? (힌트 : 클래스 이름은'Entry'와 같은 대문자로 시작해야합니다.) –
29 행의 코드 tf.updateStatus ("test!"); – Simmant
어떤 해결책이 있습니까 – Simmant