L
L
Leks22018-12-09 17:46:06
Java
Leks2, 2018-12-09 17:46:06

Looking for an APi group with an open wall?

Good evening, help me, I'm making a parser and made a small code to check groups for a certain word query, the groups are fine, but now I need to check if the wall is open in a group from the list?
VKParameters vkParameters = VKParameters.from(
VKApiConst.Q, "Music",
VKApiConst.SORT, 4,
VKApiConst.OFFSET, 0,
VKApiConst.COUNT, 5,
VKApiConst.FIELDS, "members_count",
VKApiConst.GROUP_ID, "id");
VKRequest request = VKApi.groups().search(vkParameters);
request.executeWithListener(new VKRequestListener() {
@Override
public void onComplete(VKResponse response) {
super.onComplete(response);
try {
JSONObject object = new JSONObject(response.responseString);
JSONObject responseObject = object.getJSONObject("response");
JSONArray array = responseObject.getJSONArray("items");
for (int i = 0; i < array.length(); i++) {
JSONObject item = array.getJSONObject(i);
int id = item.getInt("id");
Stringname = item.getString("name");
int is_closed = item.getInt("is_closed");
String getString = item.getString("screen_name");
//int can_post = item.getInt("can_post");
Log.i("VK", "GROUPS" + name);
public void attemptFailed(VKRequest request, int attemptNumber, int totalAttempts) {
}
})

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pepl213, 2018-12-09
@pepl213

https://vk.com/dev/wall.get
Errors:
18 Page removed or blocked
19 Content unavailable.
30 This profile is private

L
Leks2, 2018-12-09
@Leks2

How to check code?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question