0
我跟着教程鏈接在這裏(http://marakana.com/forums/android/examples/312.html),它沒有奏效。然後,我下載了源代碼並將其運行並運行。當我放入密鑰和密鑰時,它不再有效,並且在應用程序中出現'OAuthCommunicationException'。我沒有改變任何其他的東西,我怎麼才能讓它工作?謝謝OAuthCommunicationException爲微博android
編輯︰繼承人我的stacktrace的錯誤。
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
在遇到異常中給定的演示各個領域的來源,你應該總是提供帶有堆棧跟蹤的完整信息和提示異常的提示,否則在這裏很難幫助你。 –
我editted,謝謝。 – natehoch96
[Twitter API不接受Android應用程序的回調URL]的可能重複(http://stackoverflow.com/questions/6163111/twitter-api-not-accepting-callback-url-for-android-app) – FoamyGuy