christhopherguerra / java-twitter

Automatically exported from code.google.com/p/java-twitter
Apache License 2.0
0 stars 0 forks source link

Basic authentication is not supported #20

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Api api = Api.builder().username("login").password("pass").build();
  api.updateStatus("This is a test message.").build().post();
2.run the previous code 

What is the expected output? What do you see instead?
connection success

What version of the product are you using? On what operating system?
0.9-SNAPSHOT unbuntu10.10

Please provide any additional information below.
ATTENTION: Unable to respond to any of these challenges: {oauth=OAuth 
realm="http://twitter.com"}
Exception in thread "main" java.lang.RuntimeException: Expected 200 OK. 
Received 401 Unauthorized.  Response: {"errors":[{"code":53,"message":"Basic 
authentication is not supported"}]}.
    at net.unto.twitter.TwitterHttpManager.execute(TwitterHttpManager.java:212)
    at net.unto.twitter.TwitterHttpManager.post(TwitterHttpManager.java:146)
    at net.unto.twitter.methods.AbstractRequest.postJson(AbstractRequest.java:138)
    at net.unto.twitter.methods.UpdateStatusRequest.post(UpdateStatusRequest.java:71)
    at com.invivoo.tweet.Tweeter.sendTweet(Tweeter.java:26)
    at com.invivoo.tweet.Tweeter.main(Tweeter.java:33)

Original issue reported on code.google.com by sebastie...@gmail.com on 8 Jul 2011 at 3:58

GoogleCodeExporter commented 8 years ago
I have the same issue on windows.

Original comment by karol.ba...@gmail.com on 27 Sep 2011 at 8:39

GoogleCodeExporter commented 8 years ago
finally I switched to twitter4j api (http://twitter4j.org/en/index.html) and it 
worked

Original comment by sebastie...@gmail.com on 27 Sep 2011 at 2:20

GoogleCodeExporter commented 8 years ago
seems this api is no longer maintained.
Twitter now disallow basic authentication and require OAuth or XAuth

Original comment by sebastie...@gmail.com on 27 Sep 2011 at 2:27