L
L
lexstile2019-04-25 00:37:04
API
lexstile, 2019-04-25 00:37:04

How to add an entry to the community wall through the VK API on behalf of the community?

Whole code ( class ):

# отправка в ВК
  $config['user_id'] = 100000;
  include 'api/vk.php';
  $config['secret_key'] = 'pntzqCLS5oxOp0QFMD2i';
  $config['client_id'] = 6634525;
  $config['from_group'] = 1;
  $config['access_token'] = 'd431838099f694ebe073fcaca725da138bc3d35430cee15e71e526e083534b7b4bcc917558b6b180fde66';
  $v = new Vk($config);
  $response = $v->api('wall.post', array(
    'owner_id' => -112267657,
    'message' => "test",
  ));

One group sends on behalf of the community, the other does not.
What could be the reason?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
Uno, 2019-04-25
@Noizefan

Since the code is added on behalf of your personal page, then in the request you and the token are using your personal

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question