-1

Can u just tell me what this error is associated with..?Iam getting this error each time while sharing my content into Twitter....

08-27 17:13:50.966: D/error dj-->(2469): 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 (http://support.twitter.com/forums/10711/entries/15364).
08-27 17:13:50.966: D/error dj-->(2469): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
08-27 17:13:50.966: D/error dj-->(2469): <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
08-27 17:13:50.966: D/error dj-->(2469): <TITLE>ERROR: The requested URL could not be retrieved</TITLE>
08-27 17:13:50.966: D/error dj-->(2469): <STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
08-27 17:13:50.966: D/error dj-->(2469): <H1>ERROR</H1>
08-27 17:13:50.966: D/error dj-->(2469): <H2>The requested URL could not be retrieved</H2>
08-27 17:13:50.966: D/error dj-->(2469): <HR noshade size="1px">
08-27 17:13:50.966: D/error dj-->(2469): <P>
08-27 17:13:50.966: D/error dj-->(2469): While trying to retrieve the URL:
08-27 17:13:50.966: D/error dj-->(2469): <A HREF="http://api.twitter.com/1/statuses/update.json">http://api.twitter.com/1/statuses/update.json</A>
08-27 17:13:50.966: D/error dj-->(2469): <P>
08-27 17:13:50.966: D/error dj-->(2469): The following error was encountered:
08-27 17:13:50.966: D/error dj-->(2469): <UL>
08-27 17:13:50.966: D/error dj-->(2469): <LI>
08-27 17:13:50.966: D/error dj-->(2469): <STRONG>
08-27 17:13:50.966: D/error dj-->(2469): Access Denied.
08-27 17:13:50.966: D/error dj-->(2469): </STRONG>
08-27 17:13:50.966: D/error dj-->(2469): <P>
08-27 17:13:50.966: D/error dj-->(2469): Access control configuration prevents your request from
08-27 17:13:50.966: D/error dj-->(2469): being allowed at this time.  Please contact your service provider if
08-27 17:13:50.966: D/error dj-->(2469): you feel this is incorrect.
08-27 17:13:50.966: D/error dj-->(2469): </UL>
08-27 17:13:50.966: D/error dj-->(2469): <P>Your cache administrator is <A HREF="mailto:admin@localhost">admin@localhost</A>. 
08-27 17:13:50.966: D/error dj-->(2469): <BR clear="all">
08-27 17:13:50.966: D/error dj-->(2469): <HR noshade size="1px">
08-27 17:13:50.966: D/error dj-->(2469): <ADDRESS>
08-27 17:13:50.966: D/error dj-->(2469): Generated Tue, 27 Aug 2013 11:43:51 GMT by localhost (squid/2.7.STABLE9)
08-27 17:13:50.966: D/error dj-->(2469): </ADDRESS>
08-27 17:13:50.966: D/error dj-->(2469): </BODY></HTML>
Kiran
  • 29
  • 1
  • 6
  • is the first line not the reason? 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://dev.twitter.com/docs/error-codes-responses https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following# – Squirrel5853 Aug 27 '13 at 11:59
  • http://stackoverflow.com/questions/5121921/twitter-api-rate-limits-for-posting-updates – Squirrel5853 Aug 27 '13 at 12:05

2 Answers2

0

You are using a deprecated web service of Twitter,

http://api.twitter.com/1/statuses/update.json

This represents version 1 of the REST services, but to my knowledge Twitter is updated to 1.1.

You should change the twitter 4j library to version 3.0.3

Andro Selva
  • 53,910
  • 52
  • 193
  • 240
  • Did you enable Read and Write access on the Twitter application? – Sajith Aug 27 '13 at 11:59
  • @AndroSelva nope..it just goes to the webview of twitter..then asks for authorize app..then comes back to the login page..givin the 403 forbidden error... – Kiran Aug 27 '13 at 12:08
  • @AndroSelva this is a link for my previous query in stackflow...http://stackoverflow.com/questions/18459201/why-am-i-not-able-to-share-the-content-with-twitter?rq=1 I have even given my whole code over their...If u have some time..plz do have a look on it... – Kiran Aug 27 '13 at 12:11
0

try this example it is working for me TWITTER EXAMPLE and change your consumer_keyand secret_key we modified values.

public final String consumer_key = "Replace your KEY";
public final String secret_key = "Replace your KEY";

And this one also working fine Another Example

use latest libraries twitter4j-media-support-3.0.3.jar,twitter4j-core-3.0.3.jar

NagarjunaReddy
  • 8,621
  • 10
  • 63
  • 98