Answer the question
In order to leave comments, you need to log in
Android VK API How to get information about a user's friend by id?
I manage to get the list of required fields by friends via
VKApi.friends().get(VKParameters.from(VKApiConst.FIELDS,"id,first_name,last_name,photo_100,photo_max_orig,online,status"));
VKRequest request = VKApi.users().get(VKParameters.from(VKid,VKApiConst.FIELDS,"counters"));
request.executeWithListener(new VKRequest.VKRequestListener() {
@Override
public void onComplete(VKResponse response) {
super.onComplete(response);
VKList list = (VKList) response.parsedModel;
String s = list.get(0).fields.toString();
}
});
Answer the question
In order to leave comments, you need to log in
Maybe I'm somehow incorrectly passing the id of the user I'm interested in to users().get()
To see a working example for any request - you want a lot, learn to work with documentation and learn how to debug, the VK SDK for Android is just a "wrapper" for the usual VK API that works via HTTP (except for the procedure for obtaining a token, which is simplified on android) , therefore, also use the documentation for this API, and use the sniffer and the source code of the "wrapper" to debug it and understand what is being parsed and where.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question