0

我按照这里的教程链接(http://marakana.com/forums/android/examples/312.html),它没有工作。然后我下载了源代码并让它运行和工作。但是,当我输入密钥和密钥时,它不再起作用,并且我在应用程序中收到“OAuthCommunicationException”。我没有改变任何其他东西,我怎样才能让它工作?谢谢

编辑:这是我的堆栈跟踪错误。

07-07 18:56:47.835: W/System.err(586): oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: https://api.twitter.com/oauth/request_token
07-07 18:56:47.835: W/System.err(586):  at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:214)
07-07 18:56:47.835: W/System.err(586):  at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)
07-07 18:56:47.845: W/System.err(586):  at com.marakana.oauth.MainActivity$OAuthAuthorizeTask.doInBackground(MainActivity.java:114)
07-07 18:56:47.845: W/System.err(586):  at com.marakana.oauth.MainActivity$OAuthAuthorizeTask.doInBackground(MainActivity.java:1)
07-07 18:56:47.845: W/System.err(586):  at android.os.AsyncTask$2.call(AsyncTask.java:264)
07-07 18:56:47.845: W/System.err(586):  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
07-07 18:56:47.845: W/System.err(586):  at java.util.concurrent.FutureTask.run(FutureTask.java:137)
07-07 18:56:47.845: W/System.err(586):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
07-07 18:56:47.855: W/System.err(586):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
07-07 18:56:47.855: W/System.err(586):  at java.lang.Thread.run(Thread.java:856)
07-07 18:56:47.855: W/System.err(586): Caused by: java.io.FileNotFoundException: https://api.twitter.com/oauth/request_token
07-07 18:56:47.865: W/System.err(586):  at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:177)
07-07 18:56:47.865: W/System.err(586):  at libcore.net.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:270)
07-07 18:56:47.875: W/System.err(586):  at oauth.signpost.basic.HttpURLConnectionResponseAdapter.getContent(HttpURLConnectionResponseAdapter.java:18)
07-07 18:56:47.875: W/System.err(586):  at oauth.signpost.AbstractOAuthProvider.handleUnexpectedResponse(AbstractOAuthProvider.java:228)
07-07 18:56:47.885: W/System.err(586):  at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:189)
07-07 18:56:47.895: W/System.err(586):  ... 9 more
4

1 回答 1

0

请让源您更改给定演示中需要的所有字段,例如消费者密钥、消费者秘密、访问令牌、访问令牌秘密等,请参阅http://www.android10.org/index.php/articleslibraries/291-twitter-integration-in -你的安卓应用程序

于 2012-07-03T05:29:53.083 回答