-1

你能告诉我这个错误与什么有关吗?我每次在 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>
4

2 回答 2

0

您正在使用已弃用的 Twitter 网络服务,

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

这代表 REST 服务的版本 1,但据我所知 Twitter 已更新到 1.1。

您应该将 twitter 4j 库更改为版本 3.0.3

于 2013-08-27T11:57:07.460 回答
0

试试这个例子,它对我 有用 推特示例并更改您consumer_keysecret_key我们修改的值。

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

这个也可以正常工作另一个例子

使用最新的库 twitter4j-media-support-3.0.3.jartwitter4j-core-3.0.3.jar

于 2013-08-27T12:19:24.857 回答