@vladimir_volohov

Как узнать owner_id?

{
"response": {
"count": 1,
"items": [{
"peer": {...},
"in_read": 0,
"out_read": 0,
"last_message_id": 0,
"can_write": {...},
"chat_settings": {
"acl": {...},
"owner_id": xxxx,
"state": "in",
"title": "ЭТО ПРОСТО БАН!",
"active_ids": [xxx, xxx],
"members_count": 2,
"photo": {
"photo_100": "https://pp.userap...wgyPfm55o.jpg?ava=1",
"photo_200": "https://pp.userap...j4eBuhJ9M.jpg?ava=1",
"photo_50": "https://pp.userap...YGQMcYK8k.jpg?ava=1"
},
"admin_ids": [-179327162]
},
"current_keyboard": {
"one_time": false,
"author_id": -179327162,
"buttons": [[{
"action": {
"type": "text",
"label": "!проф",
"payload": "{"button":"111"}"
},
"color": "primary"
}, {
"action": {
"type": "text",
"label": "!банк",
"payload": "{"button":"222"}"
},
"color": "primary"
}], [{
"action": {
"type": "text",
"label": "!поход",
"payload": "{"button":"444"}"
},
"color": "primary"
}, {
"action": {
"type": "text",
"label": "!м",
"payload": "{"button":"555"}"
},
"color": "primary"
}], [{
"action": {
"type": "text",
"label": "Резерв снять",
"payload": "{"button":"666"}"
},
"color": "default"
}]]
}
}]
}
}


Получить нужно строку:
"owner_id": xxxx,

У меня получилось вот так, но не сработало.

$dop = json_decode(file_get_contents('https://api.vk.com/method/messages.getConversationsById?'. $ho)); // отправка запроса
		$kek = $dop->response->items[5]->chat_settings[1]->owner_id;
  • Вопрос задан
  • 224 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы