0
我使用scrible 1.3.5爲Android創建應用程序,並有從「https://api.twitter.com/1.1/account/verify_credentials.json」 但得到錯誤的問題得到響應的Android與抄寫錯誤無法驗證你代碼:32
"{"errors":[{"message":"Could not authenticate you","code":32}]}"
有一個獨立的活動,首先有服務的創建
service = new ServiceBuilder()
.provider(TwitterApi.SSL.class)
.apiKey(getString(R.string.twitter_customer_key))
.apiSecret(getString(R.string.twitter_customer_secret))
.callback(getString(R.string.twitter_callback_url))
.build();
中的AsyncTask我收到請求令牌之後和authUrl
requestToken = service.getRequestToken();
service.getAuthorizationUrl(requestToken);
,在我的實現WebViewClient的我越來越接取令牌後
Uri uri = Uri.parse(url);
final Verifier verifier = new Verifier(uri.getQueryParameter("oauth_verifier"));
(new AsyncTask<Void, Void, Token>() {
@Override
protected Token doInBackground(Void... params) {
Token accessToken = service.getAccessToken(requestToken, verifier);
OAuthRequest request = new OAuthRequest(Verb.GET, "https://api.twitter.com/1.1/account/verify_credentials.json");
service.signRequest(accessToken, request);
Response response = request.
Log.d("TWITTER RESPONSE", response.getBody());
return accessToken;
}
@Override
protected void onPostExecute(Token accessToken) {
// AccessToken is passed here! Do what you
finish();
}
}).execute();
我在做什麼錯了,也許有一些辦法找出這些錯誤信息任何東西,我可以提供的任何詳細信息