B
B
barder2020-12-14 22:13:17
PHP
barder, 2020-12-14 22:13:17

How, when creating a link for publication in VK, do you want to swallow the length?

There is a PHP script that publishes to the VKontakte group.

$params = array(
'v'            => $version,
access_token' => $access_token,
'owner_id'     => '-' . $group_id, 
'from_group'   => '1', 
'message'      => $message,
'attachments'  => 'photo' . $oUrl2->response[0]->owner_id . '_' . $oUrl2->response[0]->id.',' . $link
);
$result = file_get_contents('https://api.vk.com/method/wall.post?' . $param);
$result = json_decode($result);
$VK_ID = $result->response->post_id;

Everything would be fine, but the link turns out to be long, tk. $message contains text with more characters.

So the question itself is how to transfer a large text for publication?

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