I'm using the latest Android SDK for VK, and trying to get posts from my wall:
VKParameters vkParameters = VKParameters.from(VKApiConst.USER_ID, SettingsManager.getInstance().getVkId());
VKRequest vkRequest = VKApi.wall().get(vkParameters);
vkRequest.executeWithListener(new VKRequest.VKRequestListener() {
@Override
public void onComplete(VKResponse response) {
super.onComplete(response);
VKList<VKApiPost> posts = (VKList<VKApiPost>) response.parsedModel;
for (VKApiPost post : posts) {
Logger.i(GuestsActivity.class, "Post: " + post.getId());
}
}
@Override
public void onError(VKError error) {
super.onError(error);
}
});
I see the JSON and string in response, but parsedModel is null:
Why and how to fix it?
您需要添加请求参数extended
(是的,我知道它很奇怪):
VKApiConst.EXTENDED, 1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.