This code is used when requests are being denied due to update limits


#1

Hi!

I am new to Twitter applications.

I created a twitter application, and got there the consumer key, secret as well as the access token itself.

I hardly have posts on my twitter, but when I try the following code: (I am using my application keys, and my own access tokens

ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(true).setOAuthConsumerKey(consumerKey).setOAuthConsumerSecret(consumerPassword).setOAuthAccessToken(authKey).setOAuthAccessTokenSecret(authKeySecret);
TwitterFactory tf = new TwitterFactory(cb.build());
Twitter twitter = tf.getInstance();
StatusUpdate latestStatus = new StatusUpdate("test");
Status status = null;
try {
   status = twitter.updateStatus(latestStatus);
} catch (TwitterException e) {
}

I get:

403: This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
error - Error creating status.

How could it be? am I missing something?


#2

I saw that the problem was that I sent a URL.

Can’t I send a url in the media?

Why do I need to upload file?

Thanks


#3

Hi Odelya,

The statuses/update_with_media method specifically only allows for uploaded file data that will end up hosted on pic.twitter.com – it won’t consume a URL that you provide and upload it for you unfortunately. You could alternately just use regular statuses/update and simply include a link to the URL of the file on the web, but it won’t necessarily get the same visual treatment.


#4

I’ve just got the same message…is it possible to tweet too much so that it starts rejecting your tweets? I was just testing my apps ability to tweet anything and now it’s being rejected after only 2 :frowning:


#5

My application has got the same error message when calling the API bellow:
Open Declaration RequestToken twitter4j.auth.OAuthSupport.getOAuthRequestToken(String callbackURL) throws TwitterException

Error message is
403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
TwitterException{exceptionCode=[10f5ada3-e574402b], statusCode=403, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=3.0.3}

Could you tell me what I should do now?
Thanks


#6

api.twitter.com now required to use SSL.
Either update to twitter4j 3.0.5 or set useSSL to true in twitter4j.properties.


#7

Update your twitter4j jars with latest jars, you will get it from http://twitter4j.org/en/index.html
It works for me.


#8

Thanks i have Updated my twitter4j jars with latest jars and it worked for me too.