I am trying to POST tweet using REST API v1.1
I am able to make all of the rest of calls, but facing following error each time in this call “statuses/update”:
{“errors”:[{“message”:“Could not authenticate you”,“code”:32}]}
String RESOURCE_URL = "https://api.twitter.com/1.1/statuses/update.json";
OAuthService service = new ServiceBuilder().provider(TwitterApi.class)
.apiKey(consumerKey)
.apiSecret(consumerSecret).build();
Token accessToken = new Token(token, secret);
OAuthRequest request = new OAuthRequest(Verb.POST, RESOURCE_URL);
request.addPayload("status=Hello%20World");
service.signRequest(accessToken, request);
Response response = request.send();
response.getBody();