I am looking for a way to determine if my site user is in my off. group of this site. Is it even possible using PHP or Javascript?
- Condition is not exactly what was meant. The information you are interested in is called membership. Please correct the question. - maxleo
|
2 answers
No longer relevant, returns
{ "error": { "error_code": 8, "error_msg": "Invalid request: v (version) is required", "request_params": [{ "key": "oauth", "value": "1" }, { "key": "method", "value": "groups.isMember" }, { "key": "group_id", "value": "165323728" }, { "key": "user_id", "value": "28900072" }] } } - Sorry, but what is not relevant? - 0xdb
|
VKontakte has an API. The API has a groups.isMember method that does exactly what you need.
In addition, it is open - you do not need to register the application, just pull the url with the necessary parameters.
//Состоит ли пользователь с id = 1 в группе с id = 1 https://api.vk.com/method/groups.isMember?group_id=1&user_id=1 - Okay, and how to find out user_id, without user intervention? - igolka97
- @ igolka97 vk.com/dev/openapi see. “Example of authorization through the Open API” - Jofsey
- @ igolka97 I think without the participation of the user in any way, it would be a violation of confidentiality. - zb '
|