Answer the question
In order to leave comments, you need to log in
How to display information about a group in VK on the site?
Good afternoon. How can this function be implemented:
A person enters a link to a group in VK in the field and below under the field gives him information about the group, namely: Group name, description, number of participants and avatar. When submitting the form, this data should be saved and no longer updated from the VK API. With VK API Not very good friends. If it can be done that way, then how?
Answer the question
In order to leave comments, you need to log in
for example, the person entered https://vk.com/apiclub
, you need to send a request using the groups.getById method , passing the parameters group_id
and fields
, in this case:
the response from the API:
{
"response": [{
"id": 1,
"name": "ВКонтакте API",
"screen_name": "apiclub",
"is_closed": 0,
"type": "group",
"is_admin": 0,
"is_member": 0,
"members_count": 354209,
"description": "Группа посвящена разработке приложений на основе платформы ВКонтакте API и
всему, что с ней связано.
API позволяет создавать интересные, интерактивные и популярные приложения. Встроенные
средства монетизации позволяют приносить доход разработчикам приложений, начиная с
первых дней запуска.
Если у вас возник вопрос или проблема, связанная с приложениями, а не с их созданием -
обратитесь в службу поддержки: https://vk.com/support?act=new&from=sg. Там помогут, тут нет.",
"photo_50": "https://pp.userap...2DXpoO0h8.jpg?ava=1",
"photo_100": "https://pp.userap...mcXQP0V6c.jpg?ava=1",
"photo_200": "https://pp.userap...dFMmxSRyY.jpg?ava=1"
}]
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question