Good day to all. There was a question about using the VK library / How to get a profile image during authorization using VKSDK
- @Oneills, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Nicolas Chabanovsky ♦
|
1 answer
After logging in, send a request like this: in photo_max_orig_url image link
VKParameters params = new VKParameters(); params.put(VKApiConst.FIELDS, "photo_max_orig"); VKRequest request = new VKRequest("users.get",params); request.executeWithListener(new VKRequest.VKRequestListener() { @Override public void onComplete(VKResponse response) { super.onComplete(response); JSONArray resp = response.json.getJSONArray("response"); JSONObject user = resp.getJSONObject(0); String photo_max_orig_url = user.getString("photo_max_orig"); } @Override public void onError(VKError error) { super.onError(error); } });
|