Answer the question
In order to leave comments, you need to log in
I make a POST request to the wall.post method but it comes in encrypted text?
Here's the code. The encrypted text arrives. Changed to "Content-type: multipart/form-data" then nothing comes at all. How to fix?
$url = 'https://api.vk.com/method/wall.post';
$params = array(
'owner_id' => '-'.$groupId, // Кому отправляем
'message' => $message, // Что отправляем
'attachments' => $attachments, // Прикрепления
'publish_date' => $timestamp, // Дата откладывания
'access_token' => $tokenadmin, // access_token
'v' => '5.67',
);
// В $result вернется id отправленного сообщения
$request = file_get_contents($url, false, stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($params)
)
)));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question