2012-03-06 7 views

risposta

17

Non c'è bisogno di id. Funzionerà anche con nome utente.

mTwitter.createFriendship("dj") 
0

La seguente configurazione lo farà:

ConfigurationBuilder cb =new ConfigurationBuilder(); 
     cb.setDebugEnabled(true) 
      .setOAuthConsumerKey("******") 
      .setOAuthConsumerSecret("******") 
      .setOAuthAccessToken("*******") 
      .setOAuthAccessTokenSecret("********"); 

     //In case of proxy 
     //cb.setHttpProxyHost("******").setHttpProxyPort(8080); 


     TwitterFactory twitterFactory=new TwitterFactory(cb.build()); 
     Twitter twitter=twitterFactory.getInstance(); 

     twitter.createFriendship("twitter id"); 
Problemi correlati