VK Android SDK (com.perm.kate.api) を使用しています https://bitbucket.org/ruX/android-vk-sdk/overview
ある日以下に提供するコードの最後の行は、KException を返し始めました。
ドキュメントから: ある種のアクションが頻繁に完了すると、API へのリクエストで「キャプチャが必要です」というエラーが返される場合があります。ユーザーは画像からコードを入力し、入力したキャプチャ コードをリクエスト パラメータに指定してリクエストを再送信する必要があります。
- captcha_sid - キャプチャ識別子 captcha_img
- 画像からテキストを入力できるように、ユーザーに表示する必要がある画像へのリンク。
問題は、このパラメーターをどこに入力すればよいかということです。メソッドを使用して、これらの引数を含まないユーザー プロファイルを取得します。
public ArrayList<User> getProfiles(Collection<Long> uids, Collection<String> domains, String fields, String name_case) throws MalformedURLException, IOException, JSONException, KException
ユーザー プロファイルを取得するコード:
Api vkApi=new Api(account.access_token, Constants.API_ID);
//get user
Collection<Long>userIds=new ArrayList<Long>();
userIds.add(account.user_id);
ArrayList<User> users=vkApi.getProfiles(userIds, null, null, null); //KException