V
V
Viplayer2019-10-01 10:38:45
PHP
Viplayer, 2019-10-01 10:38:45

How to get all forwarded SMS IDs from JSON VK?

{"type":"message_new","object":{"date":1569914952,"from_id":172659635,"id":0,"out":0,"peer_id":2000000003,"text":"\/ид","conversation_message_id":1446382,"fwd_messages":[{"date":1569914724,"from_id":269380079,"text":"доброе утро, Катя.❤","attachments":[]},{"date":1569914724,"from_id":474762898,"text":"почему я не могу инвайтить","attachments":[]}],"important":false,"random_id":0,"attachments":[],"is_hidden":false},"group_id":175583814}

Here is what the server answers, in "fwd_messages" I can get the ID of the first one, but the 2nd one, etc. is no longer visible...
if ($forW = $vk->getFwdMessage($data->object)) {	
$vk->sendMessage($peer_id, ''.$forW->from_id);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question