java - Getting TwitterException while trying to post a tweet from code within eclipse -


  • i newbie twitter4j.

  • i have registered app twitter, got consumerkey, consumersecret, accesstoken , accesstokensecret.

  • i followed steps mentioned here, here , came below code , tried run eclipse (jdk 1.7).

    import twitter4j.status; import twitter4j.twitter; import twitter4j.twitterexception; import twitter4j.twitterfactory; import twitter4j.conf.configurationbuilder;  public class tweetmain { public static void main(string[] args) {     configurationbuilder cb = new configurationbuilder();     cb.setdebugenabled(true)       .setoauthconsumerkey("key")       .setoauthconsumersecret("secret")       .setoauthaccesstoken("token")       .setoauthaccesstokensecret("tokensecret");     twitterfactory tf = new twitterfactory(cb.build());     twitter twitter = tf.getinstance();          status status;     try {         status = twitter.updatestatus("first tweet within java code @java,@twitter, @twitter4j");         system.out.println("successfully updated status [" + status.gettext() + "].");     } catch (twitterexception e) {         // todo auto-generated catch block         e.printstacktrace();     } } 

    }

  • i got below exception:

read timed out relevant discussions can found on internet at: http://www.google.co.jp/search?q=2fc5b7cb or http://www.google.co.jp/search?q=0ea287e1 twitterexception{exceptioncode=[2fc5b7cb-0ea287e1 2fc5b7cb-0ea287b7], statuscode=-1, message=null, code=-1, retryafter=-1, ratelimitstatus=null, version=4.0.4}

  • please let me know have gone wrong. thanks.

[update]: able execute system(debian). shall recheck whether things go fine earlier system(windows7). update on had gone wrong. meanwhile, if aware of exception based on exception code, please answer/comment. thanks.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -