Hello everyone!
It's me again. I am trying to attach an image to twitter status update. I am using the following code:
But when I try this I get:Code:Twitter twitter = new TwitterTemplate(consumerKey, consumerSecret, twitterAccessToken, accessTokenSecret); StatusDetails statusDetails = new StatusDetails(); statusDetails.setLocation(-34.61178f, -58.41731f); statusDetails.setDisplayCoordinates(true); Resource photo = getUploadResource("C:/foto.jpg", "PHOTO DATA"); twitter.timelineOperations().updateStatus("Este es un nuevo mensaje para la pagina twitter desde spring social 231234", photo, statusDetails);
Code:WARN: org.springframework.web.client.RestTemplate - POST request for "https://upload.twitter.com/1/statuses/update_with_media.json" resulted in 403 (Forbidden); invoking error handler Exception in thread "main" org.springframework.social.OperationNotPermittedException: Error creating status. at org.springframework.social.twitter.api.impl.TwitterErrorHandler.handleClientErrors(TwitterErrorHandler.java:105) at org.springframework.social.twitter.api.impl.TwitterErrorHandler.handleError(TwitterErrorHandler.java:58) at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:486) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:443) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:401) at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:279) at org.springframework.social.twitter.api.impl.TimelineTemplate.updateStatus(TimelineTemplate.java:245) at com.solopaquetes.service.Test.main(Test.java:30)
I have these settings:
OAuth settings
Access level Read, write, and direct messages
Your access token
Access level Read and write
Any ideas whats going on? Thanks


. I am trying to attach an image to twitter status update. I am using the following code:
Reply With Quote
